The following example shows how you can use cURL to screenshot a tweet and save it as an image:
curl https://api.pikaso.me/screenshot/twitter \
-d tweet_id=1033749606373445633 \
-d layout=nova1 \
-d theme=dark \
-d size=auto \
-u $TOKEN:$TOKEN_SECRET \
HTTP/1.1 200 OK
Content-Disposition: attachment; filename="api.pikaso.me-dog_feelings-20180826_161446-1033749606373445633.png"
<binary image data>
To authenticate, you need to generate an API Key
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)
This method lets you screenshot a tweet.
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
The response contains the generated screenshot image as binary. The format of the image is specified in the Content-Type header field.
Invalid argument. The error.code field in the response body contains the actual error:
Pikaso's access to your Twitter account has been revoked.
The required tweet_id param was not supplied.
The tweet was not found.
You are not authorized to view this tweet.
Twitter is having problems right now.
The specified layout argument was invalid.
The specified theme argument was invalid.
The specified size argument was invalid.