-
-
Save nhunsaker/ed21c1e26bdf101ff57eea214d731b4e to your computer and use it in GitHub Desktop.
instagram_video_publish_now_curl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -X POST \ | |
http://dev.buzzfeed.io:33005/pubhub/drafts \ | |
-H 'Content-Type: application/json' \ | |
-H 'Postman-Token: e4f660d9-bbd6-416f-9968-97fb4559527b' \ | |
-H 'X-Auth-Token: {insert token}' \ | |
-H 'X-Forwarded-Email: your.email@buzzfeed.com' \ | |
-H 'X-Forwarded-User-Id: 1' \ | |
-H 'X-Send-To-Platform: true' \ | |
-H 'cache-control: no-cache' \ | |
-d '{ | |
"title": "this video to publish now is for instagram", | |
"metadata": {}, | |
"source": "hive", | |
"type": "instagram_video", | |
"uuid": 1551729736832, | |
"content_id": "bfn:gateway::hive:artifacts:12341231", | |
"content_authored_by": "your.email@buzzfeed.com", | |
"platform_data": { | |
"media": { | |
"video_url": "https://s3.amazonaws.com/video-api-stage/assets/0b23116b013a46f380ba745a3d6456f6/test-pattern-59.mp4" | |
} | |
}, | |
"video_url": "https://s3.amazonaws.com/video-api-stage/assets/0b23116b013a46f380ba745a3d6456f6/test-pattern-59.mp4", | |
"channel_id": 248, | |
"published_at": "2019-03-04T20:02:28" | |
}' |
Get the Draft.id
from the returned payload then look up your draft via the API:
https://pubhub-stage.buzzfeed.com/api/pubhub/drafts/{id}
https://pubhub-stage.buzzfeed.com/api/pubhub/jobs?draft_id={id}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace
{insert token}
with auth token. Setyour.email@buzzfeed.com
to your email. To schedule removeX-Send-To-Platform: true
header. Removepublished_at
. Setscheduled_at
to a future date.