Quick Example
The following example shows how you can use cURL to screenshot a tweet and save it as an image:
curl https://pikaso.me/api/v1/tweet \
-d tweet_id=1033749606373445633 \
-d layout=nova1 \
-d theme=dark \
-d size=auto \
-G \
-u $TOKEN:$TOKEN_SECRET \
-o tweet.png
HTTP/1.1 200 OK
Content-Type: image/png
Content-Length: 111499
Content-Disposition: attachment; filename="pikaso.me-dog_feelings-20180826_161446-1033749606373445633.png"
<binary image data>
Authentication
To authenticate, you need to generate an
API Key first.
Your API Key consists of a
Token and a
Token Secret. You should send them as username and password in the
Basic Auth method with your request:
credentials = Base64(token + ":" + token_secret)
set_header("Authorization: Basic " + credentials)
Screenshot Tweet
This method lets you screenshot a tweet.
Endpoint
GET https://pikaso.me/api/v1/tweet
Params
(Required)
The ID of the tweet that you want to screenshot.
The layout to use.
bubble1, bubble2, bubble3, bubble4, bubble5, bubble6, fab1, fab2, iconic1, nova1, nova2, nova3, nova4, quote1, simple1, simple2, square1, square2, standard, random
The theme to use.
light, dark, lights_out, autumn, carnation, cerise, forest, growth, pattens_blue, moon_yellow, pistachio, pumpkin, sapphire, shamrock, spanish_yellow, random
The size of the generated image.
auto, ig_post, ig_story
Response
The response contains the generated screenshot image as binary. The format of the image is specified in the Content-Type header field.
Errors
Missing/invalid credentials.
Invalid argument. The error.code field in the response body contains the actual error:
invalid_access_token
Pikaso's access to your Twitter account has been revoked.
missing_tweet_id
The required tweet_id param was not supplied.
tweet_not_found
The tweet was not found.
unauthorized
You are not authorized to view this tweet.
twitter_error
Twitter is having problems right now.
invalid_layout
The specified layout argument was invalid.
invalid_theme
The specified theme argument was invalid.
invalid_size
The specified size argument was invalid.