This repository has been archived by the owner on Jul 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Facebook Reels Publishing API.postman_collection.json
292 lines (292 loc) · 7.25 KB
/
Facebook Reels Publishing API.postman_collection.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
{
"info": {
"_postman_id": "ac4261d5-77f5-4dcc-b96e-35bf18c01873",
"name": "Facebook Reels Publishing API",
"description": "This collection allows developers to upload and publish a Reel into a Facebook page from a local file or CDN.\n\n**Supported video formats:** `3g2`, `3gp`, `3gpp`, `asf`, `avi`, `dat`, `divx`, `dv`, `f4v`, `flv`, `m2ts`, `m4v`, `mkv`, `mod`, `mov`, `mp4`, `mpe`, `mpeg`, `mpeg4`, `mpg`, `mts`, `nsv`, `ogm`, `ogv`, `qt`, `tod`, `ts`, `vob`, `wmv`.\n\n**Video requirements:**\n\n| Property | Min (or n/a) | Max (or n/a) |\n| --- | --- | --- |\n| <br> <br>Resolution <br> <br> | <br> <br>540 x 960 (540p) <br> <br> | <br> <br>n/a <br> <br> |\n| <br> <br>Aspect Ratio <br> <br> | <br> <br>9x16 <br> <br> | <br> <br>9x16 <br> <br> |\n| <br> <br>Frame Rate <br> <br> | <br> <br>23 <br> <br> | <br> <br>n/a <br> <br> |\n| <br> <br>Duration <br> <br> | <br> <br>4 sec <br> <br> | <br> <br>60 sec <br> <br> |\n| <br> <br>File Size <br> <br> | <br> <br>n/a <br> <br> | <br> <br>n/a <br> <br> |",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "19667706"
},
"item": [
{
"name": "1. Create Reel",
"event": [
{
"listen": "test",
"script": {
"exec": [
"if (pm.response.code==200)",
"{",
" var jsonData = JSON.parse(responseBody);",
" postman.setEnvironmentVariable(\"video_id\", jsonData.video_id);",
"}",
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://graph.facebook.com/v13.0/me/video_reels?access_token={{access_token}}&upload_phase=start",
"protocol": "https",
"host": [
"graph",
"facebook",
"com"
],
"path": [
"v13.0",
"me",
"video_reels"
],
"query": [
{
"key": "access_token",
"value": "{{access_token}}",
"description": "Page Access Token"
},
{
"key": "upload_phase",
"value": "start",
"description": "Signal to initialize a new upload phase"
}
]
},
"description": "This request initializes a video upload session. When successful the API response includes a **video_id** that will be used in subsequent calls as the identifier for our Reel in the upload, status and publish steps."
},
"response": []
},
{
"name": "2.A Upload Local Reel",
"event": [
{
"listen": "prerequest",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"content-type": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "OAuth {{access_token}}",
"type": "text"
},
{
"key": "offset",
"value": "0",
"description": "In case of resumable upload, replace this with the offset returned by /status",
"type": "text"
},
{
"key": "file_size",
"value": "0",
"description": "Replace with your local video file size",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/octet-stream",
"type": "text"
}
],
"body": {
"mode": "file",
"file": {
"src": ""
}
},
"url": {
"raw": "https://rupload.facebook.com/video-upload/v13.0/{{video_id}}",
"protocol": "https",
"host": [
"rupload",
"facebook",
"com"
],
"path": [
"video-upload",
"v13.0",
"{{video_id}}"
]
},
"description": "This method is used when the video source is a local file. The video must be included in the request body as a data binary and its file size in bytes must be included in the **file_size** header."
},
"response": []
},
{
"name": "2.B Upload Hosted Reel",
"protocolProfileBehavior": {
"disabledSystemHeaders": {
"content-type": true
}
},
"request": {
"method": "POST",
"header": [
{
"key": "Authorization",
"value": "OAuth {{access_token}}",
"type": "text"
},
{
"key": "file_url",
"value": "",
"type": "text",
"description": "Replace with your own web hosted video URL"
}
],
"url": {
"raw": "https://rupload.facebook.com/video-upload/v13.0/{{video_id}}",
"protocol": "https",
"host": [
"rupload",
"facebook",
"com"
],
"path": [
"video-upload",
"v13.0",
"{{video_id}}"
]
},
"description": "This method is used when the video source is hosted on a CDN. The video link must be included in the **file_url** header."
},
"response": []
},
{
"name": "3. (Optional) Get upload session status",
"request": {
"method": "GET",
"header": [],
"url": {
"raw": "https://graph.facebook.com/v13.0/{{video_id}}?fields=status&access_token={{access_token}}",
"protocol": "https",
"host": [
"graph",
"facebook",
"com"
],
"path": [
"v13.0",
"{{video_id}}"
],
"query": [
{
"key": "fields",
"value": "status"
},
{
"key": "access_token",
"value": "{{access_token}}"
}
]
},
"description": "Retrieves the status of the Reels publishing operation composed of three steps, uploading, processing and publishing."
},
"response": []
},
{
"name": "4. Publish Reel",
"event": [
{
"listen": "test",
"script": {
"exec": [
""
],
"type": "text/javascript"
}
}
],
"request": {
"method": "POST",
"header": [],
"url": {
"raw": "https://graph.facebook.com/v13.0/me/video_reels?access_token={{access_token}}&video_id={{video_id}}&upload_phase=finish&video_state=PUBLISHED&description=Description text goes here&title=Title goes here",
"protocol": "https",
"host": [
"graph",
"facebook",
"com"
],
"path": [
"v13.0",
"me",
"video_reels"
],
"query": [
{
"key": "access_token",
"value": "{{access_token}}"
},
{
"key": "video_id",
"value": "{{video_id}}"
},
{
"key": "upload_phase",
"value": "finish",
"description": "Signal to finish the upload phase"
},
{
"key": "video_state",
"value": "PUBLISHED",
"description": "Possible values: DRAFT, SCHEDULED, PUBLISHED"
},
{
"key": "description",
"value": "Description text goes here",
"description": "Optional"
},
{
"key": "title",
"value": "Title goes here",
"description": "Optional"
}
]
},
"description": "Ends the upload phase to start assembling and encoding the video. You can also customize the reel with the optional parameters."
},
"response": []
}
],
"event": [
{
"listen": "prerequest",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
},
{
"listen": "test",
"script": {
"type": "text/javascript",
"exec": [
""
]
}
}
],
"variable": [
{
"key": "video_id",
"value": ""
}
]
}