@volter/twin-tiktok 0.1.37 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/README.md +25 -308
  2. package/business/spec/SOURCE.md +17 -0
  3. package/business/spec/openapi.json +1045 -0
  4. package/business/spec/sources.json +84 -0
  5. package/business/src/fetch.ts +14 -0
  6. package/business/src/generated/surface.gen.json +1 -0
  7. package/business/src/generated/ui.gen.json +1 -0
  8. package/business/src/index.ts +3 -0
  9. package/business/src/manifest.ts +38 -0
  10. package/business/src/semantics/index.ts +16 -0
  11. package/business/src/semantics/open_api.ts +142 -0
  12. package/business/src/semantics/shared.ts +119 -0
  13. package/business/src/semantics/states.ts +3 -0
  14. package/dist/business/spec/SOURCE.md +17 -0
  15. package/dist/business/spec/openapi.json +1045 -0
  16. package/dist/business/spec/sources.json +84 -0
  17. package/dist/business/src/fetch.d.ts +2 -0
  18. package/dist/business/src/fetch.js +13 -0
  19. package/dist/business/src/fetch.ts +14 -0
  20. package/dist/business/src/generated/surface.gen.json +1 -0
  21. package/dist/business/src/generated/ui.gen.json +1 -0
  22. package/dist/business/src/index.d.ts +2 -0
  23. package/dist/business/src/index.js +3 -0
  24. package/dist/business/src/index.ts +3 -0
  25. package/dist/business/src/manifest.d.ts +2 -0
  26. package/dist/business/src/manifest.js +33 -0
  27. package/dist/business/src/manifest.ts +38 -0
  28. package/dist/business/src/semantics/index.d.ts +2 -0
  29. package/dist/business/src/semantics/index.js +12 -0
  30. package/dist/business/src/semantics/index.ts +16 -0
  31. package/dist/business/src/semantics/open_api.d.ts +10 -0
  32. package/dist/business/src/semantics/open_api.js +162 -0
  33. package/dist/business/src/semantics/open_api.ts +142 -0
  34. package/dist/business/src/semantics/shared.d.ts +31 -0
  35. package/dist/business/src/semantics/shared.js +109 -0
  36. package/dist/business/src/semantics/shared.ts +119 -0
  37. package/dist/business/src/semantics/states.d.ts +8 -0
  38. package/dist/business/src/semantics/states.js +3 -0
  39. package/dist/business/src/semantics/states.ts +3 -0
  40. package/dist/generated/pack-facts.json +55 -0
  41. package/dist/journeys/coverage.json +220 -0
  42. package/dist/journeys/customer-life.json +2950 -0
  43. package/dist/journeys/customer-life.outline.md +59 -0
  44. package/dist/journeys/decisions.json +161 -0
  45. package/dist/journeys/demand.json +142 -0
  46. package/dist/journeys/score.json +294 -0
  47. package/dist/journeys/unreachable.json +13 -0
  48. package/dist/open/spec/SOURCE.md +20 -0
  49. package/dist/open/spec/openapi.json +1417 -0
  50. package/dist/open/spec/sources.json +124 -0
  51. package/dist/open/src/engine/mp4.d.ts +6 -0
  52. package/dist/open/src/engine/mp4.js +55 -0
  53. package/dist/open/src/engine/mp4.ts +48 -0
  54. package/dist/open/src/fetch.d.ts +2 -0
  55. package/dist/open/src/fetch.js +17 -0
  56. package/dist/open/src/fetch.ts +18 -0
  57. package/dist/open/src/generated/surface.gen.json +1 -0
  58. package/dist/open/src/generated/ui.gen.json +1 -0
  59. package/dist/open/src/index.d.ts +2 -0
  60. package/dist/open/src/index.js +3 -0
  61. package/dist/open/src/index.ts +3 -0
  62. package/dist/open/src/manifest.d.ts +2 -0
  63. package/dist/open/src/manifest.js +53 -0
  64. package/dist/open/src/manifest.ts +59 -0
  65. package/dist/open/src/screens/authorize.d.ts +2 -0
  66. package/dist/open/src/screens/authorize.js +53 -0
  67. package/dist/open/src/screens/authorize.ts +53 -0
  68. package/dist/open/src/semantics/doors.d.ts +10 -0
  69. package/dist/open/src/semantics/doors.js +118 -0
  70. package/dist/open/src/semantics/doors.ts +121 -0
  71. package/dist/open/src/semantics/index.d.ts +2 -0
  72. package/dist/open/src/semantics/index.js +16 -0
  73. package/dist/open/src/semantics/index.ts +20 -0
  74. package/dist/open/src/semantics/oauth.d.ts +2 -0
  75. package/dist/open/src/semantics/oauth.js +30 -0
  76. package/dist/open/src/semantics/oauth.ts +28 -0
  77. package/dist/open/src/semantics/post.d.ts +6 -0
  78. package/dist/open/src/semantics/post.js +66 -0
  79. package/dist/open/src/semantics/post.ts +60 -0
  80. package/dist/open/src/semantics/shared.d.ts +51 -0
  81. package/dist/open/src/semantics/shared.js +196 -0
  82. package/dist/open/src/semantics/shared.ts +197 -0
  83. package/dist/open/src/semantics/states.d.ts +20 -0
  84. package/dist/open/src/semantics/states.js +15 -0
  85. package/dist/open/src/semantics/states.ts +23 -0
  86. package/dist/open/src/semantics/user.d.ts +2 -0
  87. package/dist/open/src/semantics/user.js +24 -0
  88. package/dist/open/src/semantics/user.ts +24 -0
  89. package/dist/open/src/semantics/video.d.ts +4 -0
  90. package/dist/open/src/semantics/video.js +112 -0
  91. package/dist/open/src/semantics/video.ts +97 -0
  92. package/dist/src/cli.js +11 -34
  93. package/dist/src/fetch.d.ts +2 -0
  94. package/dist/src/fetch.js +9 -0
  95. package/dist/src/index.d.ts +5 -22
  96. package/dist/src/index.js +13 -167
  97. package/dist/src/manifest.d.ts +2 -0
  98. package/dist/src/manifest.js +28 -0
  99. package/dist/src/semantics/shared.d.ts +49 -0
  100. package/dist/src/semantics/shared.js +61 -0
  101. package/dist/src/server.d.ts +7 -0
  102. package/dist/src/server.js +7 -0
  103. package/generated/pack-facts.json +55 -0
  104. package/journeys/coverage.json +220 -0
  105. package/journeys/customer-life.json +2950 -0
  106. package/journeys/customer-life.outline.md +59 -0
  107. package/journeys/decisions.json +161 -0
  108. package/journeys/demand.json +142 -0
  109. package/journeys/score.json +294 -0
  110. package/journeys/unreachable.json +13 -0
  111. package/open/spec/SOURCE.md +20 -0
  112. package/open/spec/openapi.json +1417 -0
  113. package/open/spec/sources.json +124 -0
  114. package/open/src/engine/mp4.ts +48 -0
  115. package/open/src/fetch.ts +18 -0
  116. package/open/src/generated/surface.gen.json +1 -0
  117. package/open/src/generated/ui.gen.json +1 -0
  118. package/open/src/index.ts +3 -0
  119. package/open/src/manifest.ts +59 -0
  120. package/open/src/screens/authorize.ts +53 -0
  121. package/open/src/semantics/doors.ts +121 -0
  122. package/open/src/semantics/index.ts +20 -0
  123. package/open/src/semantics/oauth.ts +28 -0
  124. package/open/src/semantics/post.ts +60 -0
  125. package/open/src/semantics/shared.ts +197 -0
  126. package/open/src/semantics/states.ts +23 -0
  127. package/open/src/semantics/user.ts +24 -0
  128. package/open/src/semantics/video.ts +97 -0
  129. package/package.json +13 -41
  130. package/src/cli.ts +11 -32
  131. package/src/fetch.ts +10 -0
  132. package/src/index.ts +15 -270
  133. package/src/manifest.ts +33 -0
  134. package/src/semantics/shared.ts +78 -0
  135. package/src/server.ts +8 -0
  136. package/client/tiktok-consent.tsx +0 -154
  137. package/client/tiktok-mirror.css +0 -137
  138. package/client/tiktok-mirror.tsx +0 -497
  139. package/dist/client/tiktok-consent.bundle.js +0 -18
  140. package/dist/client/tiktok-consent.d.ts +0 -47
  141. package/dist/client/tiktok-consent.js +0 -20
  142. package/dist/client/tiktok-consent.tsx +0 -154
  143. package/dist/client/tiktok-mirror.bundle.js +0 -484
  144. package/dist/client/tiktok-mirror.css +0 -137
  145. package/dist/client/tiktok-mirror.d.ts +0 -42
  146. package/dist/client/tiktok-mirror.js +0 -325
  147. package/dist/client/tiktok-mirror.tsx +0 -497
  148. package/dist/src/tiktok-blobs.d.ts +0 -66
  149. package/dist/src/tiktok-blobs.js +0 -161
  150. package/dist/src/tiktok-budget.d.ts +0 -56
  151. package/dist/src/tiktok-budget.js +0 -136
  152. package/dist/src/tiktok-capabilities.d.ts +0 -7
  153. package/dist/src/tiktok-capabilities.js +0 -1855
  154. package/dist/src/tiktok-conformance.d.ts +0 -11
  155. package/dist/src/tiktok-conformance.js +0 -498
  156. package/dist/src/tiktok-connector.d.ts +0 -158
  157. package/dist/src/tiktok-connector.js +0 -600
  158. package/dist/src/tiktok-consent-ui.d.ts +0 -19
  159. package/dist/src/tiktok-consent-ui.js +0 -127
  160. package/dist/src/tiktok-errors.d.ts +0 -78
  161. package/dist/src/tiktok-errors.js +0 -175
  162. package/dist/src/tiktok-ids.d.ts +0 -16
  163. package/dist/src/tiktok-ids.js +0 -48
  164. package/dist/src/tiktok-media.d.ts +0 -7
  165. package/dist/src/tiktok-media.js +0 -86
  166. package/dist/src/tiktok-mirror-ui.d.ts +0 -61
  167. package/dist/src/tiktok-mirror-ui.js +0 -187
  168. package/dist/src/tiktok-pkce.d.ts +0 -25
  169. package/dist/src/tiktok-pkce.js +0 -56
  170. package/dist/src/tiktok-posting.d.ts +0 -100
  171. package/dist/src/tiktok-posting.js +0 -599
  172. package/dist/src/tiktok-sample-mp4.d.ts +0 -10
  173. package/dist/src/tiktok-sample-mp4.js +0 -55
  174. package/dist/src/tiktok-scopes.d.ts +0 -29
  175. package/dist/src/tiktok-scopes.js +0 -106
  176. package/dist/src/tiktok-server.d.ts +0 -28
  177. package/dist/src/tiktok-server.js +0 -99
  178. package/dist/src/tiktok-store.d.ts +0 -164
  179. package/dist/src/tiktok-store.js +0 -451
  180. package/dist/src/tiktok-twin.d.ts +0 -70
  181. package/dist/src/tiktok-twin.js +0 -1197
  182. package/dist/src/tiktok-user.d.ts +0 -28
  183. package/dist/src/tiktok-user.js +0 -174
  184. package/src/tiktok-blobs.ts +0 -217
  185. package/src/tiktok-budget.ts +0 -163
  186. package/src/tiktok-capabilities.ts +0 -2022
  187. package/src/tiktok-conformance.ts +0 -526
  188. package/src/tiktok-connector.ts +0 -637
  189. package/src/tiktok-consent-ui.ts +0 -146
  190. package/src/tiktok-errors.ts +0 -197
  191. package/src/tiktok-ids.ts +0 -51
  192. package/src/tiktok-journey.uitest.ts +0 -305
  193. package/src/tiktok-media.ts +0 -89
  194. package/src/tiktok-mirror-ui.ts +0 -193
  195. package/src/tiktok-pkce.ts +0 -61
  196. package/src/tiktok-posting.ts +0 -617
  197. package/src/tiktok-sample-mp4.ts +0 -54
  198. package/src/tiktok-scopes.ts +0 -122
  199. package/src/tiktok-server.ts +0 -110
  200. package/src/tiktok-store.ts +0 -543
  201. package/src/tiktok-twin.ts +0 -1361
  202. package/src/tiktok-user.ts +0 -137
@@ -0,0 +1,2950 @@
1
+ {
2
+ "vendor": "tiktok",
3
+ "author": "codex-demand-rule",
4
+ "about": "Postiz e0a08a7d9592 connecting Tidewater Yoga’s selected TikTok channel, posting videos and photos, and reading analytics; operations cited in demand.json.",
5
+ "steps": [
6
+ {
7
+ "name": "Tuesday 20 January, 09:00: Tidewater Yoga connects TikTok to Postiz",
8
+ "wait": "27900m"
9
+ },
10
+ {
11
+ "name": "The developer site: Postiz's app, its client key and secret",
12
+ "method": "POST",
13
+ "path": "/_twin/app-credentials",
14
+ "status": 201,
15
+ "body": {},
16
+ "capture": {
17
+ "ck": "client_key",
18
+ "cs": "client_secret"
19
+ }
20
+ },
21
+ {
22
+ "name": "Its redirect URI and its verified media domain",
23
+ "method": "POST",
24
+ "path": "/_twin/apps",
25
+ "status": 200,
26
+ "body": {
27
+ "redirect_uris": [
28
+ "https://postiz.tidewater.yoga/integrations/social/tiktok"
29
+ ],
30
+ "url_properties": [
31
+ "media.tidewater.yoga"
32
+ ]
33
+ },
34
+ "expect": [
35
+ {
36
+ "path": "redirect_uris.0",
37
+ "equals": "https://postiz.tidewater.yoga/integrations/social/tiktok"
38
+ }
39
+ ]
40
+ },
41
+ {
42
+ "name": "Maya's TikTok account",
43
+ "method": "POST",
44
+ "path": "/_twin/people",
45
+ "status": 201,
46
+ "body": {
47
+ "username": "tidewateryoga",
48
+ "display_name": "Tidewater Yoga",
49
+ "password": "savasana-2026",
50
+ "follower_count": 1240,
51
+ "following_count": 180,
52
+ "likes_count": 9800,
53
+ "max_video_post_duration_sec": 600
54
+ }
55
+ },
56
+ {
57
+ "name": "A redirect URI the app never registered is refused on the page",
58
+ "method": "GET",
59
+ "path": "https://www.tiktok.com/v2/auth/authorize/?client_key={ck}&redirect_uri=https%3A%2F%2Fevil.example%2Fcb&state=x&response_type=code&scope=user.info.basic",
60
+ "status": 400,
61
+ "expect": [
62
+ {
63
+ "path": "",
64
+ "contains": "redirect_uri is not registered"
65
+ }
66
+ ]
67
+ },
68
+ {
69
+ "name": "Postiz sends Maya to the authorize page",
70
+ "method": "GET",
71
+ "path": "https://www.tiktok.com/v2/auth/authorize/?client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=st4te&response_type=code&scope=video.list%2Cuser.info.basic%2Cvideo.publish%2Cvideo.upload%2Cuser.info.profile%2Cuser.info.stats",
72
+ "status": 200,
73
+ "expect": [
74
+ {
75
+ "path": "",
76
+ "contains": "Log in to TikTok"
77
+ }
78
+ ]
79
+ },
80
+ {
81
+ "name": "She logs in",
82
+ "method": "POST",
83
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
84
+ "status": 200,
85
+ "headers": {
86
+ "content-type": "application/x-www-form-urlencoded"
87
+ },
88
+ "body": "client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=st4te&response_type=code&scope=video.list%2Cuser.info.basic%2Cvideo.publish%2Cvideo.upload%2Cuser.info.profile%2Cuser.info.stats&username=tidewateryoga&password=savasana-2026",
89
+ "expect": [
90
+ {
91
+ "path": "",
92
+ "contains": "would like to access your TikTok account"
93
+ }
94
+ ]
95
+ },
96
+ {
97
+ "name": "She authorizes: back to Postiz with a code, the scopes and the state",
98
+ "method": "POST",
99
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
100
+ "status": 302,
101
+ "headers": {
102
+ "content-type": "application/x-www-form-urlencoded"
103
+ },
104
+ "body": "client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=st4te&response_type=code&scope=video.list%2Cuser.info.basic%2Cvideo.publish%2Cvideo.upload%2Cuser.info.profile%2Cuser.info.stats&username=tidewateryoga&password=savasana-2026&decision=authorize",
105
+ "capture": {
106
+ "code": "redirect.code"
107
+ },
108
+ "expect": [
109
+ {
110
+ "path": "redirect.state",
111
+ "equals": "st4te"
112
+ },
113
+ {
114
+ "path": "redirect.scopes",
115
+ "equals": "video.list,user.info.basic,video.publish,video.upload,user.info.profile,user.info.stats"
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "name": "Postiz trades the code",
121
+ "method": "POST",
122
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
123
+ "status": 200,
124
+ "headers": {
125
+ "content-type": "application/x-www-form-urlencoded"
126
+ },
127
+ "body": "client_key={ck}&client_secret={cs}&code={code}&grant_type=authorization_code&code_verifier=st4te&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok",
128
+ "capture": {
129
+ "at": "access_token",
130
+ "rt": "refresh_token"
131
+ },
132
+ "expect": [
133
+ {
134
+ "path": "token_type",
135
+ "equals": "Bearer"
136
+ },
137
+ {
138
+ "path": "scope",
139
+ "equals": "video.list,user.info.basic,video.publish,video.upload,user.info.profile,user.info.stats"
140
+ },
141
+ {
142
+ "path": "expires_in",
143
+ "equals": 86400
144
+ }
145
+ ]
146
+ },
147
+ {
148
+ "name": "The same code again is refused",
149
+ "method": "POST",
150
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
151
+ "status": 400,
152
+ "headers": {
153
+ "content-type": "application/x-www-form-urlencoded"
154
+ },
155
+ "body": "client_key={ck}&client_secret={cs}&code={code}&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok",
156
+ "expect": [
157
+ {
158
+ "path": "error",
159
+ "equals": "invalid_grant"
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ "name": "Postiz names the account",
165
+ "method": "GET",
166
+ "path": "https://open.tiktokapis.com/v2/user/info/?fields=open_id,avatar_url,display_name,union_id,username",
167
+ "status": 200,
168
+ "headers": {
169
+ "authorization": "Bearer {at}"
170
+ },
171
+ "expect": [
172
+ {
173
+ "path": "data.user.display_name",
174
+ "equals": "Tidewater Yoga"
175
+ },
176
+ {
177
+ "path": "data.user.username",
178
+ "equals": "tidewateryoga"
179
+ },
180
+ {
181
+ "path": "error.code",
182
+ "equals": "ok"
183
+ }
184
+ ]
185
+ },
186
+ {
187
+ "name": "The creator's longest video",
188
+ "method": "POST",
189
+ "path": "https://open.tiktokapis.com/v2/post/publish/creator_info/query/",
190
+ "status": 200,
191
+ "headers": {
192
+ "authorization": "Bearer {at}",
193
+ "content-type": "application/json; charset=UTF-8"
194
+ },
195
+ "expect": [
196
+ {
197
+ "path": "data.max_video_post_duration_sec",
198
+ "equals": 600
199
+ },
200
+ {
201
+ "path": "data.privacy_level_options.0",
202
+ "equals": "PUBLIC_TO_EVERYONE"
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "name": "A privacy level not among the creator's options is refused",
208
+ "method": "POST",
209
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
210
+ "status": 403,
211
+ "headers": {
212
+ "authorization": "Bearer {at}",
213
+ "content-type": "application/json; charset=UTF-8"
214
+ },
215
+ "body": {
216
+ "post_info": {
217
+ "title": "Spring flow at sunrise #yoga",
218
+ "privacy_level": "FOLLOWER_OF_CREATOR",
219
+ "disable_duet": false,
220
+ "disable_comment": false,
221
+ "disable_stitch": false
222
+ },
223
+ "source_info": {
224
+ "source": "FILE_UPLOAD",
225
+ "video_size": 2304,
226
+ "chunk_size": 2304,
227
+ "total_chunk_count": 1
228
+ }
229
+ },
230
+ "expect": [
231
+ {
232
+ "path": "error.code",
233
+ "equals": "privacy_level_option_mismatch"
234
+ }
235
+ ]
236
+ },
237
+ {
238
+ "name": "A video posted directly, one chunk",
239
+ "method": "POST",
240
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
241
+ "status": 200,
242
+ "headers": {
243
+ "authorization": "Bearer {at}",
244
+ "content-type": "application/json; charset=UTF-8"
245
+ },
246
+ "body": {
247
+ "post_info": {
248
+ "title": "Spring flow at sunrise #yoga",
249
+ "privacy_level": "PUBLIC_TO_EVERYONE",
250
+ "disable_duet": false,
251
+ "disable_comment": false,
252
+ "disable_stitch": false
253
+ },
254
+ "source_info": {
255
+ "source": "FILE_UPLOAD",
256
+ "video_size": 2304,
257
+ "chunk_size": 2304,
258
+ "total_chunk_count": 1
259
+ }
260
+ },
261
+ "capture": {
262
+ "pid": "data.publish_id",
263
+ "uurl": "data.upload_url"
264
+ },
265
+ "expect": [
266
+ {
267
+ "path": "data.upload_url",
268
+ "contains": "open-upload.tiktokapis.com/video/"
269
+ }
270
+ ]
271
+ },
272
+ {
273
+ "name": "Its bytes to the upload URL",
274
+ "method": "PUT",
275
+ "path": "{uurl}",
276
+ "status": 201,
277
+ "headers": {
278
+ "content-type": "video/mp4",
279
+ "content-range": "bytes 0-2303/2304"
280
+ },
281
+ "bodyBase64": "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAADYbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAdTAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAGR0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAdTAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAABDgAAAeAAAAAAAgIbWRhdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
282
+ },
283
+ {
284
+ "name": "Posted, publicly",
285
+ "method": "POST",
286
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
287
+ "status": 200,
288
+ "headers": {
289
+ "authorization": "Bearer {at}",
290
+ "content-type": "application/json; charset=UTF-8"
291
+ },
292
+ "body": {
293
+ "publish_id": "{pid}"
294
+ },
295
+ "capture": {
296
+ "vid": "data.publicaly_available_post_id.0"
297
+ },
298
+ "expect": [
299
+ {
300
+ "path": "data.status",
301
+ "equals": "PUBLISH_COMPLETE"
302
+ },
303
+ {
304
+ "path": "data.uploaded_bytes",
305
+ "equals": 2304
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ "name": "The finished upload takes no more",
311
+ "method": "PUT",
312
+ "path": "{uurl}",
313
+ "status": 416,
314
+ "headers": {
315
+ "content-type": "video/mp4",
316
+ "content-range": "bytes 0-2303/2304"
317
+ },
318
+ "bodyBase64": "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAADYbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAdTAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAGR0cmFrAAAAXHRraGQAAAADAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
319
+ },
320
+ {
321
+ "name": "A second video to Maya's inbox",
322
+ "method": "POST",
323
+ "path": "https://open.tiktokapis.com/v2/post/publish/inbox/video/init/",
324
+ "status": 200,
325
+ "headers": {
326
+ "authorization": "Bearer {at}",
327
+ "content-type": "application/json; charset=UTF-8"
328
+ },
329
+ "body": {
330
+ "source_info": {
331
+ "source": "FILE_UPLOAD",
332
+ "video_size": 2304,
333
+ "chunk_size": 2304,
334
+ "total_chunk_count": 1
335
+ }
336
+ },
337
+ "capture": {
338
+ "pid2": "data.publish_id",
339
+ "uurl2": "data.upload_url"
340
+ }
341
+ },
342
+ {
343
+ "name": "Its bytes",
344
+ "method": "PUT",
345
+ "path": "{uurl2}",
346
+ "status": 201,
347
+ "headers": {
348
+ "content-type": "video/mp4",
349
+ "content-range": "bytes 0-2303/2304"
350
+ },
351
+ "bodyBase64": "AAAAIGZ0eXBpc29tAAACAGlzb21pc28yYXZjMW1wNDEAAADYbW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAAdTAAAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAGR0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAABAAAAAAAAdTAAAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAABDgAAAeAAAAAAAgIbWRhdAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
352
+ },
353
+ {
354
+ "name": "Sent to the inbox",
355
+ "method": "POST",
356
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
357
+ "status": 200,
358
+ "headers": {
359
+ "authorization": "Bearer {at}",
360
+ "content-type": "application/json; charset=UTF-8"
361
+ },
362
+ "body": {
363
+ "publish_id": "{pid2}"
364
+ },
365
+ "expect": [
366
+ {
367
+ "path": "data.status",
368
+ "equals": "SEND_TO_USER_INBOX"
369
+ },
370
+ {
371
+ "path": "data.publicaly_available_post_id",
372
+ "equals": []
373
+ }
374
+ ]
375
+ },
376
+ {
377
+ "name": "Maya asks to review a 65 MiB class recording in her TikTok inbox; Postiz plans six 10 MiB chunks with the remainder in the last (tiktok.provider.ts:703-718,825-832)",
378
+ "method": "POST",
379
+ "path": "https://open.tiktokapis.com/v2/post/publish/inbox/video/init/",
380
+ "status": 200,
381
+ "headers": {
382
+ "authorization": "Bearer {at}",
383
+ "content-type": "application/json; charset=UTF-8"
384
+ },
385
+ "body": {
386
+ "source_info": {
387
+ "source": "FILE_UPLOAD",
388
+ "video_size": 68157440,
389
+ "chunk_size": 10485760,
390
+ "total_chunk_count": 6
391
+ }
392
+ },
393
+ "capture": {
394
+ "largePid": "data.publish_id",
395
+ "largeUrl": "data.upload_url"
396
+ }
397
+ },
398
+ {
399
+ "name": "Postiz streams class recording part 1/6; TikTok has more chunks to receive",
400
+ "method": "PUT",
401
+ "path": "{largeUrl}",
402
+ "status": 206,
403
+ "headers": {
404
+ "content-type": "video/mp4",
405
+ "content-range": "bytes 0-10485759/68157440",
406
+ "content-length": "10485760"
407
+ },
408
+ "bodyFill": {
409
+ "text": "\u0000\u0000\u0000\u0018ftypisom\u0000\u0000\u0000\u0000isommp41\u0000\u0000\u0000$moov\u0000\u0000\u0000\u001cmvhd\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u001e",
410
+ "bytes": 10485760
411
+ }
412
+ },
413
+ {
414
+ "name": "Postiz streams class recording part 2/6; TikTok has more chunks to receive",
415
+ "method": "PUT",
416
+ "path": "{largeUrl}",
417
+ "status": 206,
418
+ "headers": {
419
+ "content-type": "video/mp4",
420
+ "content-range": "bytes 10485760-20971519/68157440",
421
+ "content-length": "10485760"
422
+ },
423
+ "bodyFill": {
424
+ "text": "\u0000",
425
+ "bytes": 10485760
426
+ }
427
+ },
428
+ {
429
+ "name": "Postiz streams class recording part 3/6; TikTok has more chunks to receive",
430
+ "method": "PUT",
431
+ "path": "{largeUrl}",
432
+ "status": 206,
433
+ "headers": {
434
+ "content-type": "video/mp4",
435
+ "content-range": "bytes 20971520-31457279/68157440",
436
+ "content-length": "10485760"
437
+ },
438
+ "bodyFill": {
439
+ "text": "\u0000",
440
+ "bytes": 10485760
441
+ }
442
+ },
443
+ {
444
+ "name": "Postiz streams class recording part 4/6; TikTok has more chunks to receive",
445
+ "method": "PUT",
446
+ "path": "{largeUrl}",
447
+ "status": 206,
448
+ "headers": {
449
+ "content-type": "video/mp4",
450
+ "content-range": "bytes 31457280-41943039/68157440",
451
+ "content-length": "10485760"
452
+ },
453
+ "bodyFill": {
454
+ "text": "\u0000",
455
+ "bytes": 10485760
456
+ }
457
+ },
458
+ {
459
+ "name": "Postiz streams class recording part 5/6; TikTok has more chunks to receive",
460
+ "method": "PUT",
461
+ "path": "{largeUrl}",
462
+ "status": 206,
463
+ "headers": {
464
+ "content-type": "video/mp4",
465
+ "content-range": "bytes 41943040-52428799/68157440",
466
+ "content-length": "10485760"
467
+ },
468
+ "bodyFill": {
469
+ "text": "\u0000",
470
+ "bytes": 10485760
471
+ }
472
+ },
473
+ {
474
+ "name": "Postiz streams class recording part 6/6; the final part includes the five MiB remainder",
475
+ "method": "PUT",
476
+ "path": "{largeUrl}",
477
+ "status": 201,
478
+ "headers": {
479
+ "content-type": "video/mp4",
480
+ "content-range": "bytes 52428800-68157439/68157440",
481
+ "content-length": "15728640"
482
+ },
483
+ "bodyFill": {
484
+ "text": "\u0000",
485
+ "bytes": 15728640
486
+ }
487
+ },
488
+ {
489
+ "name": "The complete large class recording is ready for Maya to finish in TikTok, with every byte uploaded",
490
+ "method": "POST",
491
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
492
+ "status": 200,
493
+ "headers": {
494
+ "authorization": "Bearer {at}"
495
+ },
496
+ "body": {
497
+ "publish_id": "{largePid}"
498
+ },
499
+ "expect": [
500
+ {
501
+ "path": "data.status",
502
+ "equals": "SEND_TO_USER_INBOX"
503
+ },
504
+ {
505
+ "path": "data.uploaded_bytes",
506
+ "equals": 68157440
507
+ },
508
+ {
509
+ "path": "data.publicaly_available_post_id",
510
+ "equals": []
511
+ }
512
+ ]
513
+ },
514
+ {
515
+ "name": "Photos from a domain the app never verified",
516
+ "method": "POST",
517
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
518
+ "status": 403,
519
+ "headers": {
520
+ "authorization": "Bearer {at}",
521
+ "content-type": "application/json; charset=UTF-8"
522
+ },
523
+ "body": {
524
+ "media_type": "PHOTO",
525
+ "post_mode": "DIRECT_POST",
526
+ "post_info": {
527
+ "title": "Spring",
528
+ "privacy_level": "PUBLIC_TO_EVERYONE"
529
+ },
530
+ "source_info": {
531
+ "source": "PULL_FROM_URL",
532
+ "photo_cover_index": 0,
533
+ "photo_images": [
534
+ "https://cdn.example.org/a.jpg"
535
+ ]
536
+ }
537
+ },
538
+ "expect": [
539
+ {
540
+ "path": "error.code",
541
+ "equals": "url_ownership_unverified"
542
+ }
543
+ ]
544
+ },
545
+ {
546
+ "name": "Photos from the studio's verified domain, whose server the World does not run",
547
+ "method": "POST",
548
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
549
+ "status": 200,
550
+ "headers": {
551
+ "authorization": "Bearer {at}",
552
+ "content-type": "application/json; charset=UTF-8"
553
+ },
554
+ "body": {
555
+ "media_type": "PHOTO",
556
+ "post_mode": "DIRECT_POST",
557
+ "post_info": {
558
+ "title": "Spring",
559
+ "privacy_level": "PUBLIC_TO_EVERYONE"
560
+ },
561
+ "source_info": {
562
+ "source": "PULL_FROM_URL",
563
+ "photo_cover_index": 0,
564
+ "photo_images": [
565
+ "https://media.tidewater.yoga/spring/1.jpg",
566
+ "https://media.tidewater.yoga/spring/2.jpg"
567
+ ]
568
+ }
569
+ },
570
+ "capture": {
571
+ "pid3": "data.publish_id"
572
+ }
573
+ },
574
+ {
575
+ "name": "The pull failed",
576
+ "method": "POST",
577
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
578
+ "status": 200,
579
+ "headers": {
580
+ "authorization": "Bearer {at}",
581
+ "content-type": "application/json; charset=UTF-8"
582
+ },
583
+ "body": {
584
+ "publish_id": "{pid3}"
585
+ },
586
+ "expect": [
587
+ {
588
+ "path": "data.status",
589
+ "equals": "FAILED"
590
+ },
591
+ {
592
+ "path": "data.fail_reason",
593
+ "equals": "photo_pull_failed"
594
+ }
595
+ ]
596
+ },
597
+ {
598
+ "name": "TikTok's audience watches the video",
599
+ "method": "POST",
600
+ "path": "/_twin/videos/{vid}/stats",
601
+ "status": 200,
602
+ "body": {
603
+ "view_count": 1200,
604
+ "like_count": 150,
605
+ "comment_count": 12,
606
+ "share_count": 8
607
+ }
608
+ },
609
+ {
610
+ "name": "Postiz reads the account's stats",
611
+ "method": "GET",
612
+ "path": "https://open.tiktokapis.com/v2/user/info/?fields=follower_count,following_count,likes_count,video_count",
613
+ "status": 200,
614
+ "headers": {
615
+ "authorization": "Bearer {at}"
616
+ },
617
+ "expect": [
618
+ {
619
+ "path": "data.user.follower_count",
620
+ "equals": 1240
621
+ },
622
+ {
623
+ "path": "data.user.video_count",
624
+ "equals": 1
625
+ }
626
+ ]
627
+ },
628
+ {
629
+ "name": "The account's videos: the public one",
630
+ "method": "POST",
631
+ "path": "https://open.tiktokapis.com/v2/video/list/?fields=id,cover_image_url,title",
632
+ "status": 200,
633
+ "headers": {
634
+ "authorization": "Bearer {at}",
635
+ "content-type": "application/json; charset=UTF-8"
636
+ },
637
+ "body": {
638
+ "max_count": 20
639
+ },
640
+ "expect": [
641
+ {
642
+ "path": "data.videos.0.id",
643
+ "equals": "{vid}"
644
+ },
645
+ {
646
+ "path": "data.videos.0.title",
647
+ "equals": "Spring flow at sunrise #yoga"
648
+ },
649
+ {
650
+ "path": "data.videos.1",
651
+ "exists": false
652
+ },
653
+ {
654
+ "path": "data.has_more",
655
+ "equals": false
656
+ }
657
+ ]
658
+ },
659
+ {
660
+ "name": "Its counts, and what its file says",
661
+ "method": "POST",
662
+ "path": "https://open.tiktokapis.com/v2/video/query/?fields=id,like_count,comment_count,share_count,view_count,duration,width,height",
663
+ "status": 200,
664
+ "headers": {
665
+ "authorization": "Bearer {at}",
666
+ "content-type": "application/json; charset=UTF-8"
667
+ },
668
+ "body": {
669
+ "filters": {
670
+ "video_ids": [
671
+ "{vid}"
672
+ ]
673
+ }
674
+ },
675
+ "expect": [
676
+ {
677
+ "path": "data.videos.0.view_count",
678
+ "equals": 1200
679
+ },
680
+ {
681
+ "path": "data.videos.0.like_count",
682
+ "equals": 150
683
+ },
684
+ {
685
+ "path": "data.videos.0.duration",
686
+ "equals": 30
687
+ },
688
+ {
689
+ "path": "data.videos.0.width",
690
+ "equals": 1080
691
+ },
692
+ {
693
+ "path": "data.videos.0.height",
694
+ "equals": 1920
695
+ }
696
+ ]
697
+ },
698
+ {
699
+ "name": "Wednesday: the token is refreshed",
700
+ "wait": "1440m"
701
+ },
702
+ {
703
+ "name": "A new pair",
704
+ "method": "POST",
705
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
706
+ "status": 200,
707
+ "headers": {
708
+ "content-type": "application/x-www-form-urlencoded"
709
+ },
710
+ "body": "client_key={ck}&client_secret={cs}&grant_type=refresh_token&refresh_token={rt}",
711
+ "capture": {
712
+ "at2": "access_token",
713
+ "rat": "access_token"
714
+ },
715
+ "expect": [
716
+ {
717
+ "path": "expires_in",
718
+ "equals": 86400
719
+ }
720
+ ]
721
+ },
722
+ {
723
+ "name": "The old refresh token no longer works",
724
+ "method": "POST",
725
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
726
+ "status": 400,
727
+ "headers": {
728
+ "content-type": "application/x-www-form-urlencoded"
729
+ },
730
+ "body": "client_key={ck}&client_secret={cs}&grant_type=refresh_token&refresh_token={rt}",
731
+ "expect": [
732
+ {
733
+ "path": "error",
734
+ "equals": "invalid_grant"
735
+ }
736
+ ]
737
+ },
738
+ {
739
+ "name": "Chapter 8, what TikTok refuses: the developer site takes only https redirect URIs",
740
+ "method": "POST",
741
+ "path": "/_twin/apps",
742
+ "status": 400,
743
+ "body": {
744
+ "redirect_uris": [
745
+ "http://postiz.tidewater.yoga/cb"
746
+ ]
747
+ }
748
+ },
749
+ {
750
+ "name": "A username TikTok would not take",
751
+ "method": "POST",
752
+ "path": "/_twin/people",
753
+ "status": 400,
754
+ "body": {
755
+ "username": "Not Valid!",
756
+ "password": "x"
757
+ }
758
+ },
759
+ {
760
+ "name": "An account with no password",
761
+ "method": "POST",
762
+ "path": "/_twin/people",
763
+ "status": 400,
764
+ "body": {
765
+ "username": "someone"
766
+ }
767
+ },
768
+ {
769
+ "name": "A username already taken",
770
+ "method": "POST",
771
+ "path": "/_twin/people",
772
+ "status": 400,
773
+ "body": {
774
+ "username": "tidewateryoga",
775
+ "password": "x"
776
+ }
777
+ },
778
+ {
779
+ "name": "Jonah's account (a teacher at the studio)",
780
+ "method": "POST",
781
+ "path": "/_twin/people",
782
+ "status": 201,
783
+ "body": {
784
+ "username": "jonah.teaches",
785
+ "display_name": "Jonah",
786
+ "password": "warrior-two",
787
+ "private": true
788
+ }
789
+ },
790
+ {
791
+ "name": "An unknown client key",
792
+ "method": "GET",
793
+ "path": "https://www.tiktok.com/v2/auth/authorize/?client_key=nope&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=s&response_type=code&scope=user.info.basic",
794
+ "status": 400,
795
+ "expect": [
796
+ {
797
+ "path": "",
798
+ "contains": "client_key is invalid"
799
+ }
800
+ ]
801
+ },
802
+ {
803
+ "name": "A response type other than code",
804
+ "method": "GET",
805
+ "path": "https://www.tiktok.com/v2/auth/authorize/?client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=s&response_type=token&scope=user.info.basic",
806
+ "status": 302,
807
+ "expect": [
808
+ {
809
+ "path": "redirect.error",
810
+ "equals": "invalid_request"
811
+ }
812
+ ]
813
+ },
814
+ {
815
+ "name": "A scope the app is not granted",
816
+ "method": "GET",
817
+ "path": "https://www.tiktok.com/v2/auth/authorize/?client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=s&response_type=code&scope=user.info.basic,research.data.basic",
818
+ "status": 302,
819
+ "expect": [
820
+ {
821
+ "path": "redirect.error",
822
+ "equals": "invalid_scope"
823
+ }
824
+ ]
825
+ },
826
+ {
827
+ "name": "A wrong password",
828
+ "method": "POST",
829
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
830
+ "status": 401,
831
+ "headers": {
832
+ "content-type": "application/x-www-form-urlencoded"
833
+ },
834
+ "body": "client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=s&response_type=code&scope=user.info.basic&username=jonah.teaches&password=wrong",
835
+ "expect": [
836
+ {
837
+ "path": "",
838
+ "contains": "Incorrect account or password"
839
+ }
840
+ ]
841
+ },
842
+ {
843
+ "name": "Jonah cancels",
844
+ "method": "POST",
845
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
846
+ "status": 302,
847
+ "headers": {
848
+ "content-type": "application/x-www-form-urlencoded"
849
+ },
850
+ "body": "client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=s&response_type=code&scope=user.info.basic&username=jonah.teaches&password=warrior-two&decision=cancel",
851
+ "expect": [
852
+ {
853
+ "path": "redirect.error",
854
+ "equals": "access_denied"
855
+ }
856
+ ]
857
+ },
858
+ {
859
+ "name": "Jonah authorizes his basic profile and posting only",
860
+ "method": "POST",
861
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
862
+ "status": 302,
863
+ "headers": {
864
+ "content-type": "application/x-www-form-urlencoded"
865
+ },
866
+ "body": "client_key={ck}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok&state=j&response_type=code&scope=user.info.basic%2Cvideo.publish&username=jonah.teaches&password=warrior-two&decision=authorize",
867
+ "capture": {
868
+ "jcode": "redirect.code"
869
+ }
870
+ },
871
+ {
872
+ "name": "A wrong client secret",
873
+ "method": "POST",
874
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
875
+ "status": 401,
876
+ "headers": {
877
+ "content-type": "application/x-www-form-urlencoded"
878
+ },
879
+ "body": "client_key={ck}&client_secret=wrong&code={jcode}&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok",
880
+ "expect": [
881
+ {
882
+ "path": "error",
883
+ "equals": "invalid_client"
884
+ }
885
+ ]
886
+ },
887
+ {
888
+ "name": "A redirect URI other than the code's",
889
+ "method": "POST",
890
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
891
+ "status": 400,
892
+ "headers": {
893
+ "content-type": "application/x-www-form-urlencoded"
894
+ },
895
+ "body": "client_key={ck}&client_secret={cs}&code={jcode}&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fother",
896
+ "expect": [
897
+ {
898
+ "path": "error",
899
+ "equals": "invalid_request"
900
+ }
901
+ ]
902
+ },
903
+ {
904
+ "name": "A grant type TikTok does not take",
905
+ "method": "POST",
906
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
907
+ "status": 400,
908
+ "headers": {
909
+ "content-type": "application/x-www-form-urlencoded"
910
+ },
911
+ "body": "client_key={ck}&client_secret={cs}&grant_type=client_credentials",
912
+ "expect": [
913
+ {
914
+ "path": "error",
915
+ "equals": "unsupported_grant_type"
916
+ }
917
+ ]
918
+ },
919
+ {
920
+ "name": "Jonah's code traded",
921
+ "method": "POST",
922
+ "path": "https://open.tiktokapis.com/v2/oauth/token/",
923
+ "status": 200,
924
+ "headers": {
925
+ "content-type": "application/x-www-form-urlencoded"
926
+ },
927
+ "body": "client_key={ck}&client_secret={cs}&code={jcode}&grant_type=authorization_code&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok",
928
+ "capture": {
929
+ "jt": "access_token"
930
+ },
931
+ "expect": [
932
+ {
933
+ "path": "scope",
934
+ "equals": "user.info.basic,video.publish"
935
+ }
936
+ ]
937
+ },
938
+ {
939
+ "name": "His stats need a scope he did not grant",
940
+ "method": "GET",
941
+ "path": "https://open.tiktokapis.com/v2/user/info/?fields=follower_count",
942
+ "status": 401,
943
+ "headers": {
944
+ "authorization": "Bearer {jt}"
945
+ },
946
+ "expect": [
947
+ {
948
+ "path": "error.code",
949
+ "equals": "scope_not_authorized"
950
+ }
951
+ ]
952
+ },
953
+ {
954
+ "name": "His videos too",
955
+ "method": "POST",
956
+ "path": "https://open.tiktokapis.com/v2/video/list/?fields=id",
957
+ "status": 401,
958
+ "headers": {
959
+ "authorization": "Bearer {jt}",
960
+ "content-type": "application/json"
961
+ },
962
+ "body": {},
963
+ "expect": [
964
+ {
965
+ "path": "error.code",
966
+ "equals": "scope_not_authorized"
967
+ }
968
+ ]
969
+ },
970
+ {
971
+ "name": "Maya's post is not his to read",
972
+ "method": "POST",
973
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
974
+ "status": 400,
975
+ "headers": {
976
+ "authorization": "Bearer {jt}",
977
+ "content-type": "application/json"
978
+ },
979
+ "body": {
980
+ "publish_id": "{pid}"
981
+ },
982
+ "expect": [
983
+ {
984
+ "path": "error.code",
985
+ "equals": "token_not_authorized_for_specified_publish_id"
986
+ }
987
+ ]
988
+ },
989
+ {
990
+ "name": "A private account posts only to its followers, friends or itself",
991
+ "method": "POST",
992
+ "path": "https://open.tiktokapis.com/v2/post/publish/creator_info/query/",
993
+ "status": 200,
994
+ "headers": {
995
+ "authorization": "Bearer {jt}"
996
+ },
997
+ "expect": [
998
+ {
999
+ "path": "data.privacy_level_options.0",
1000
+ "equals": "FOLLOWER_OF_CREATOR"
1001
+ },
1002
+ {
1003
+ "path": "data.duet_disabled",
1004
+ "equals": true
1005
+ }
1006
+ ]
1007
+ },
1008
+ {
1009
+ "name": "A field the user object does not have",
1010
+ "method": "GET",
1011
+ "path": "https://open.tiktokapis.com/v2/user/info/?fields=open_id,shoe_size",
1012
+ "status": 400,
1013
+ "headers": {
1014
+ "authorization": "Bearer {rat}"
1015
+ },
1016
+ "expect": [
1017
+ {
1018
+ "path": "error.code",
1019
+ "equals": "invalid_params"
1020
+ }
1021
+ ]
1022
+ },
1023
+ {
1024
+ "name": "A caption over 2200 characters",
1025
+ "method": "POST",
1026
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1027
+ "status": 400,
1028
+ "headers": {
1029
+ "authorization": "Bearer {rat}",
1030
+ "content-type": "application/json"
1031
+ },
1032
+ "body": {
1033
+ "post_info": {
1034
+ "title": "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy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yyyyyyyyyyy",
1035
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1036
+ },
1037
+ "source_info": {
1038
+ "source": "FILE_UPLOAD",
1039
+ "video_size": 1000,
1040
+ "chunk_size": 1000,
1041
+ "total_chunk_count": 1
1042
+ }
1043
+ },
1044
+ "expect": [
1045
+ {
1046
+ "path": "error.code",
1047
+ "equals": "invalid_param"
1048
+ }
1049
+ ]
1050
+ },
1051
+ {
1052
+ "name": "A video from a URL is the twin's gap, said so",
1053
+ "method": "POST",
1054
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1055
+ "status": 400,
1056
+ "headers": {
1057
+ "authorization": "Bearer {rat}",
1058
+ "content-type": "application/json"
1059
+ },
1060
+ "body": {
1061
+ "post_info": {
1062
+ "title": "x",
1063
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1064
+ },
1065
+ "source_info": {
1066
+ "source": "PULL_FROM_URL",
1067
+ "video_url": "https://media.tidewater.yoga/v.mp4"
1068
+ }
1069
+ },
1070
+ "expect": [
1071
+ {
1072
+ "path": "error.message",
1073
+ "contains": "does not model PULL_FROM_URL"
1074
+ }
1075
+ ]
1076
+ },
1077
+ {
1078
+ "name": "No source",
1079
+ "method": "POST",
1080
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1081
+ "status": 400,
1082
+ "headers": {
1083
+ "authorization": "Bearer {rat}",
1084
+ "content-type": "application/json"
1085
+ },
1086
+ "body": {
1087
+ "post_info": {
1088
+ "title": "x",
1089
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1090
+ },
1091
+ "source_info": {}
1092
+ },
1093
+ "expect": [
1094
+ {
1095
+ "path": "error.code",
1096
+ "equals": "invalid_param"
1097
+ }
1098
+ ]
1099
+ },
1100
+ {
1101
+ "name": "The chunk plan refused: no size",
1102
+ "method": "POST",
1103
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1104
+ "status": 400,
1105
+ "headers": {
1106
+ "authorization": "Bearer {rat}",
1107
+ "content-type": "application/json"
1108
+ },
1109
+ "body": {
1110
+ "post_info": {
1111
+ "title": "x",
1112
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1113
+ },
1114
+ "source_info": {
1115
+ "source": "FILE_UPLOAD"
1116
+ }
1117
+ },
1118
+ "expect": [
1119
+ {
1120
+ "path": "error.code",
1121
+ "equals": "invalid_param"
1122
+ }
1123
+ ]
1124
+ },
1125
+ {
1126
+ "name": "The chunk plan refused: over 4 gb",
1127
+ "method": "POST",
1128
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1129
+ "status": 400,
1130
+ "headers": {
1131
+ "authorization": "Bearer {rat}",
1132
+ "content-type": "application/json"
1133
+ },
1134
+ "body": {
1135
+ "post_info": {
1136
+ "title": "x",
1137
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1138
+ },
1139
+ "source_info": {
1140
+ "source": "FILE_UPLOAD",
1141
+ "video_size": 5368709120,
1142
+ "chunk_size": 10485760,
1143
+ "total_chunk_count": 512
1144
+ }
1145
+ },
1146
+ "expect": [
1147
+ {
1148
+ "path": "error.code",
1149
+ "equals": "invalid_param"
1150
+ }
1151
+ ]
1152
+ },
1153
+ {
1154
+ "name": "The chunk plan refused: no chunk plan",
1155
+ "method": "POST",
1156
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1157
+ "status": 400,
1158
+ "headers": {
1159
+ "authorization": "Bearer {rat}",
1160
+ "content-type": "application/json"
1161
+ },
1162
+ "body": {
1163
+ "post_info": {
1164
+ "title": "x",
1165
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1166
+ },
1167
+ "source_info": {
1168
+ "source": "FILE_UPLOAD",
1169
+ "video_size": 6291456
1170
+ }
1171
+ },
1172
+ "expect": [
1173
+ {
1174
+ "path": "error.code",
1175
+ "equals": "invalid_param"
1176
+ }
1177
+ ]
1178
+ },
1179
+ {
1180
+ "name": "The chunk plan refused: under 5 mb in pieces",
1181
+ "method": "POST",
1182
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1183
+ "status": 400,
1184
+ "headers": {
1185
+ "authorization": "Bearer {rat}",
1186
+ "content-type": "application/json"
1187
+ },
1188
+ "body": {
1189
+ "post_info": {
1190
+ "title": "x",
1191
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1192
+ },
1193
+ "source_info": {
1194
+ "source": "FILE_UPLOAD",
1195
+ "video_size": 4194304,
1196
+ "chunk_size": 2097152,
1197
+ "total_chunk_count": 2
1198
+ }
1199
+ },
1200
+ "expect": [
1201
+ {
1202
+ "path": "error.code",
1203
+ "equals": "invalid_param"
1204
+ }
1205
+ ]
1206
+ },
1207
+ {
1208
+ "name": "The chunk plan refused: a count that is not size over chunk",
1209
+ "method": "POST",
1210
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1211
+ "status": 400,
1212
+ "headers": {
1213
+ "authorization": "Bearer {rat}",
1214
+ "content-type": "application/json"
1215
+ },
1216
+ "body": {
1217
+ "post_info": {
1218
+ "title": "x",
1219
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1220
+ },
1221
+ "source_info": {
1222
+ "source": "FILE_UPLOAD",
1223
+ "video_size": 50000123,
1224
+ "chunk_size": 10000000,
1225
+ "total_chunk_count": 6
1226
+ }
1227
+ },
1228
+ "expect": [
1229
+ {
1230
+ "path": "error.code",
1231
+ "equals": "invalid_param"
1232
+ }
1233
+ ]
1234
+ },
1235
+ {
1236
+ "name": "The chunk plan refused: over 1000 chunks",
1237
+ "method": "POST",
1238
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1239
+ "status": 400,
1240
+ "headers": {
1241
+ "authorization": "Bearer {rat}",
1242
+ "content-type": "application/json"
1243
+ },
1244
+ "body": {
1245
+ "post_info": {
1246
+ "title": "x",
1247
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1248
+ },
1249
+ "source_info": {
1250
+ "source": "FILE_UPLOAD",
1251
+ "video_size": 4294967296,
1252
+ "chunk_size": 4194304,
1253
+ "total_chunk_count": 1024
1254
+ }
1255
+ },
1256
+ "expect": [
1257
+ {
1258
+ "path": "error.code",
1259
+ "equals": "invalid_param"
1260
+ }
1261
+ ]
1262
+ },
1263
+ {
1264
+ "name": "The chunk plan refused: one chunk over 128 MB",
1265
+ "method": "POST",
1266
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1267
+ "status": 400,
1268
+ "headers": {
1269
+ "authorization": "Bearer {rat}",
1270
+ "content-type": "application/json"
1271
+ },
1272
+ "body": {
1273
+ "post_info": {
1274
+ "title": "x",
1275
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1276
+ },
1277
+ "source_info": {
1278
+ "source": "FILE_UPLOAD",
1279
+ "video_size": 209715200,
1280
+ "chunk_size": 209715200,
1281
+ "total_chunk_count": 1
1282
+ }
1283
+ },
1284
+ "expect": [
1285
+ {
1286
+ "path": "error.code",
1287
+ "equals": "invalid_param"
1288
+ }
1289
+ ]
1290
+ },
1291
+ {
1292
+ "name": "The chunk plan refused: chunks over 64 mb",
1293
+ "method": "POST",
1294
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1295
+ "status": 400,
1296
+ "headers": {
1297
+ "authorization": "Bearer {rat}",
1298
+ "content-type": "application/json"
1299
+ },
1300
+ "body": {
1301
+ "post_info": {
1302
+ "title": "x",
1303
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1304
+ },
1305
+ "source_info": {
1306
+ "source": "FILE_UPLOAD",
1307
+ "video_size": 209715200,
1308
+ "chunk_size": 104857600,
1309
+ "total_chunk_count": 2
1310
+ }
1311
+ },
1312
+ "expect": [
1313
+ {
1314
+ "path": "error.code",
1315
+ "equals": "invalid_param"
1316
+ }
1317
+ ]
1318
+ },
1319
+ {
1320
+ "name": "An upload URL that names no task",
1321
+ "method": "PUT",
1322
+ "path": "https://open-upload.tiktokapis.com/video/?upload_id=1&upload_token=nope",
1323
+ "status": 404,
1324
+ "headers": {
1325
+ "content-type": "video/mp4",
1326
+ "content-range": "bytes 0-3/4"
1327
+ },
1328
+ "body": "abcd"
1329
+ },
1330
+ {
1331
+ "name": "A third video, initialized",
1332
+ "method": "POST",
1333
+ "path": "https://open.tiktokapis.com/v2/post/publish/video/init/",
1334
+ "status": 200,
1335
+ "headers": {
1336
+ "authorization": "Bearer {rat}",
1337
+ "content-type": "application/json"
1338
+ },
1339
+ "body": {
1340
+ "post_info": {
1341
+ "title": "Hold",
1342
+ "privacy_level": "SELF_ONLY"
1343
+ },
1344
+ "source_info": {
1345
+ "source": "FILE_UPLOAD",
1346
+ "video_size": 4,
1347
+ "chunk_size": 4,
1348
+ "total_chunk_count": 1
1349
+ }
1350
+ },
1351
+ "capture": {
1352
+ "uurl3": "data.upload_url"
1353
+ }
1354
+ },
1355
+ {
1356
+ "name": "A chunk with no Content-Range",
1357
+ "method": "PUT",
1358
+ "path": "{uurl3}",
1359
+ "status": 400,
1360
+ "headers": {
1361
+ "content-type": "video/mp4"
1362
+ },
1363
+ "body": "abcd"
1364
+ },
1365
+ {
1366
+ "name": "A chunk whose bytes are not its range",
1367
+ "method": "PUT",
1368
+ "path": "{uurl3}",
1369
+ "status": 400,
1370
+ "headers": {
1371
+ "content-type": "video/mp4",
1372
+ "content-range": "bytes 0-3/4"
1373
+ },
1374
+ "body": "abc"
1375
+ },
1376
+ {
1377
+ "name": "An hour later the upload URL has expired",
1378
+ "wait": "61m"
1379
+ },
1380
+ {
1381
+ "name": "Expired",
1382
+ "method": "PUT",
1383
+ "path": "{uurl3}",
1384
+ "status": 403,
1385
+ "headers": {
1386
+ "content-type": "video/mp4",
1387
+ "content-range": "bytes 0-3/4"
1388
+ },
1389
+ "body": "abcd"
1390
+ },
1391
+ {
1392
+ "name": "Photos: a media type other than PHOTO",
1393
+ "method": "POST",
1394
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1395
+ "status": 400,
1396
+ "headers": {
1397
+ "authorization": "Bearer {rat}",
1398
+ "content-type": "application/json"
1399
+ },
1400
+ "body": {
1401
+ "media_type": "VIDEO",
1402
+ "post_mode": "DIRECT_POST",
1403
+ "post_info": {
1404
+ "title": "Spring",
1405
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1406
+ },
1407
+ "source_info": {
1408
+ "source": "PULL_FROM_URL",
1409
+ "photo_cover_index": 0,
1410
+ "photo_images": [
1411
+ "https://media.tidewater.yoga/a.jpg"
1412
+ ]
1413
+ }
1414
+ },
1415
+ "expect": [
1416
+ {
1417
+ "path": "error.code",
1418
+ "equals": "invalid_param"
1419
+ }
1420
+ ]
1421
+ },
1422
+ {
1423
+ "name": "A post mode TikTok does not have",
1424
+ "method": "POST",
1425
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1426
+ "status": 400,
1427
+ "headers": {
1428
+ "authorization": "Bearer {rat}",
1429
+ "content-type": "application/json"
1430
+ },
1431
+ "body": {
1432
+ "media_type": "PHOTO",
1433
+ "post_mode": "LATER",
1434
+ "post_info": {
1435
+ "title": "Spring",
1436
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1437
+ },
1438
+ "source_info": {
1439
+ "source": "PULL_FROM_URL",
1440
+ "photo_cover_index": 0,
1441
+ "photo_images": [
1442
+ "https://media.tidewater.yoga/a.jpg"
1443
+ ]
1444
+ }
1445
+ },
1446
+ "expect": [
1447
+ {
1448
+ "path": "error.code",
1449
+ "equals": "invalid_param"
1450
+ }
1451
+ ]
1452
+ },
1453
+ {
1454
+ "name": "Photos uploaded rather than pulled",
1455
+ "method": "POST",
1456
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1457
+ "status": 400,
1458
+ "headers": {
1459
+ "authorization": "Bearer {rat}",
1460
+ "content-type": "application/json"
1461
+ },
1462
+ "body": {
1463
+ "media_type": "PHOTO",
1464
+ "post_mode": "DIRECT_POST",
1465
+ "post_info": {
1466
+ "title": "Spring",
1467
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1468
+ },
1469
+ "source_info": {
1470
+ "source": "FILE_UPLOAD"
1471
+ }
1472
+ },
1473
+ "expect": [
1474
+ {
1475
+ "path": "error.code",
1476
+ "equals": "invalid_param"
1477
+ }
1478
+ ]
1479
+ },
1480
+ {
1481
+ "name": "No photos",
1482
+ "method": "POST",
1483
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1484
+ "status": 400,
1485
+ "headers": {
1486
+ "authorization": "Bearer {rat}",
1487
+ "content-type": "application/json"
1488
+ },
1489
+ "body": {
1490
+ "media_type": "PHOTO",
1491
+ "post_mode": "DIRECT_POST",
1492
+ "post_info": {
1493
+ "title": "Spring",
1494
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1495
+ },
1496
+ "source_info": {
1497
+ "source": "PULL_FROM_URL",
1498
+ "photo_cover_index": 0,
1499
+ "photo_images": []
1500
+ }
1501
+ },
1502
+ "expect": [
1503
+ {
1504
+ "path": "error.code",
1505
+ "equals": "invalid_param"
1506
+ }
1507
+ ]
1508
+ },
1509
+ {
1510
+ "name": "A cover index past the photos",
1511
+ "method": "POST",
1512
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1513
+ "status": 400,
1514
+ "headers": {
1515
+ "authorization": "Bearer {rat}",
1516
+ "content-type": "application/json"
1517
+ },
1518
+ "body": {
1519
+ "media_type": "PHOTO",
1520
+ "post_mode": "DIRECT_POST",
1521
+ "post_info": {
1522
+ "title": "Spring",
1523
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1524
+ },
1525
+ "source_info": {
1526
+ "source": "PULL_FROM_URL",
1527
+ "photo_cover_index": 3,
1528
+ "photo_images": [
1529
+ "https://media.tidewater.yoga/a.jpg"
1530
+ ]
1531
+ }
1532
+ },
1533
+ "expect": [
1534
+ {
1535
+ "path": "error.code",
1536
+ "equals": "invalid_param"
1537
+ }
1538
+ ]
1539
+ },
1540
+ {
1541
+ "name": "A photo title over 90 characters",
1542
+ "method": "POST",
1543
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1544
+ "status": 400,
1545
+ "headers": {
1546
+ "authorization": "Bearer {rat}",
1547
+ "content-type": "application/json"
1548
+ },
1549
+ "body": {
1550
+ "media_type": "PHOTO",
1551
+ "post_mode": "DIRECT_POST",
1552
+ "post_info": {
1553
+ "title": "ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt",
1554
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1555
+ },
1556
+ "source_info": {
1557
+ "source": "PULL_FROM_URL",
1558
+ "photo_cover_index": 0,
1559
+ "photo_images": [
1560
+ "https://media.tidewater.yoga/a.jpg"
1561
+ ]
1562
+ }
1563
+ },
1564
+ "expect": [
1565
+ {
1566
+ "path": "error.code",
1567
+ "equals": "invalid_param"
1568
+ }
1569
+ ]
1570
+ },
1571
+ {
1572
+ "name": "A description over 4000 characters",
1573
+ "method": "POST",
1574
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1575
+ "status": 400,
1576
+ "headers": {
1577
+ "authorization": "Bearer {rat}",
1578
+ "content-type": "application/json"
1579
+ },
1580
+ "body": {
1581
+ "media_type": "PHOTO",
1582
+ "post_mode": "DIRECT_POST",
1583
+ "post_info": {
1584
+ "description": "ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd",
1585
+ "privacy_level": "PUBLIC_TO_EVERYONE"
1586
+ },
1587
+ "source_info": {
1588
+ "source": "PULL_FROM_URL",
1589
+ "photo_cover_index": 0,
1590
+ "photo_images": [
1591
+ "https://media.tidewater.yoga/a.jpg"
1592
+ ]
1593
+ }
1594
+ },
1595
+ "expect": [
1596
+ {
1597
+ "path": "error.code",
1598
+ "equals": "invalid_param"
1599
+ }
1600
+ ]
1601
+ },
1602
+ {
1603
+ "name": "A photo post's privacy not among the creator's options",
1604
+ "method": "POST",
1605
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1606
+ "status": 403,
1607
+ "headers": {
1608
+ "authorization": "Bearer {rat}",
1609
+ "content-type": "application/json"
1610
+ },
1611
+ "body": {
1612
+ "media_type": "PHOTO",
1613
+ "post_mode": "DIRECT_POST",
1614
+ "post_info": {
1615
+ "privacy_level": "FOLLOWER_OF_CREATOR"
1616
+ },
1617
+ "source_info": {
1618
+ "source": "PULL_FROM_URL",
1619
+ "photo_cover_index": 0,
1620
+ "photo_images": [
1621
+ "https://media.tidewater.yoga/a.jpg"
1622
+ ]
1623
+ }
1624
+ },
1625
+ "expect": [
1626
+ {
1627
+ "path": "error.code",
1628
+ "equals": "privacy_level_option_mismatch"
1629
+ }
1630
+ ]
1631
+ },
1632
+ {
1633
+ "name": "Photos to the inbox, pulled from the verified domain (the pull fails as before)",
1634
+ "method": "POST",
1635
+ "path": "https://open.tiktokapis.com/v2/post/publish/content/init/",
1636
+ "status": 200,
1637
+ "headers": {
1638
+ "authorization": "Bearer {rat}",
1639
+ "content-type": "application/json"
1640
+ },
1641
+ "body": {
1642
+ "media_type": "PHOTO",
1643
+ "post_mode": "MEDIA_UPLOAD",
1644
+ "post_info": {
1645
+ "title": "Drafts"
1646
+ },
1647
+ "source_info": {
1648
+ "source": "PULL_FROM_URL",
1649
+ "photo_cover_index": 0,
1650
+ "photo_images": [
1651
+ "https://media.tidewater.yoga/a.jpg"
1652
+ ]
1653
+ }
1654
+ },
1655
+ "capture": {
1656
+ "pid4": "data.publish_id"
1657
+ },
1658
+ "expect": [
1659
+ {
1660
+ "path": "data.publish_id",
1661
+ "contains": "p_inbox_url"
1662
+ }
1663
+ ]
1664
+ },
1665
+ {
1666
+ "name": "A publish_id TikTok never gave",
1667
+ "method": "POST",
1668
+ "path": "https://open.tiktokapis.com/v2/post/publish/status/fetch/",
1669
+ "status": 400,
1670
+ "headers": {
1671
+ "authorization": "Bearer {rat}",
1672
+ "content-type": "application/json"
1673
+ },
1674
+ "body": {
1675
+ "publish_id": "v_pub_file~v2.999"
1676
+ },
1677
+ "expect": [
1678
+ {
1679
+ "path": "error.code",
1680
+ "equals": "invalid_publish_id"
1681
+ }
1682
+ ]
1683
+ },
1684
+ {
1685
+ "name": "A video field the Video Object does not have",
1686
+ "method": "POST",
1687
+ "path": "https://open.tiktokapis.com/v2/video/list/?fields=id,fps",
1688
+ "status": 400,
1689
+ "headers": {
1690
+ "authorization": "Bearer {rat}",
1691
+ "content-type": "application/json"
1692
+ },
1693
+ "body": {},
1694
+ "expect": [
1695
+ {
1696
+ "path": "error.code",
1697
+ "equals": "invalid_params"
1698
+ }
1699
+ ]
1700
+ },
1701
+ {
1702
+ "name": "A page of more than 20",
1703
+ "method": "POST",
1704
+ "path": "https://open.tiktokapis.com/v2/video/list/?fields=id",
1705
+ "status": 400,
1706
+ "headers": {
1707
+ "authorization": "Bearer {rat}",
1708
+ "content-type": "application/json"
1709
+ },
1710
+ "body": {
1711
+ "max_count": 50
1712
+ },
1713
+ "expect": [
1714
+ {
1715
+ "path": "error.code",
1716
+ "equals": "invalid_params"
1717
+ }
1718
+ ]
1719
+ },
1720
+ {
1721
+ "name": "Videos before the first one's time: none",
1722
+ "method": "POST",
1723
+ "path": "https://open.tiktokapis.com/v2/video/list/?fields=id",
1724
+ "status": 200,
1725
+ "headers": {
1726
+ "authorization": "Bearer {rat}",
1727
+ "content-type": "application/json"
1728
+ },
1729
+ "body": {
1730
+ "cursor": 1768800000000
1731
+ },
1732
+ "expect": [
1733
+ {
1734
+ "path": "data.videos",
1735
+ "equals": []
1736
+ }
1737
+ ]
1738
+ },
1739
+ {
1740
+ "name": "A query naming no video",
1741
+ "method": "POST",
1742
+ "path": "https://open.tiktokapis.com/v2/video/query/?fields=id",
1743
+ "status": 400,
1744
+ "headers": {
1745
+ "authorization": "Bearer {rat}",
1746
+ "content-type": "application/json"
1747
+ },
1748
+ "body": {
1749
+ "filters": {
1750
+ "video_ids": []
1751
+ }
1752
+ },
1753
+ "expect": [
1754
+ {
1755
+ "path": "error.code",
1756
+ "equals": "invalid_params"
1757
+ }
1758
+ ]
1759
+ },
1760
+ {
1761
+ "name": "Its query for a bad field",
1762
+ "method": "POST",
1763
+ "path": "https://open.tiktokapis.com/v2/video/query/?fields=fps",
1764
+ "status": 400,
1765
+ "headers": {
1766
+ "authorization": "Bearer {rat}",
1767
+ "content-type": "application/json"
1768
+ },
1769
+ "body": {
1770
+ "filters": {
1771
+ "video_ids": [
1772
+ "{vid}"
1773
+ ]
1774
+ }
1775
+ },
1776
+ "expect": [
1777
+ {
1778
+ "path": "error.code",
1779
+ "equals": "invalid_params"
1780
+ }
1781
+ ]
1782
+ },
1783
+ {
1784
+ "name": "Stats for a video TikTok does not have",
1785
+ "method": "POST",
1786
+ "path": "/_twin/videos/0/stats",
1787
+ "status": 404,
1788
+ "body": {
1789
+ "view_count": 1
1790
+ }
1791
+ },
1792
+ {
1793
+ "name": "The video's cover, from TikTok's CDN",
1794
+ "method": "GET",
1795
+ "path": "/_twin/media/cover-{vid}.png",
1796
+ "status": 200,
1797
+ "expect": [
1798
+ {
1799
+ "header": "content-type",
1800
+ "equals": "image/png"
1801
+ }
1802
+ ]
1803
+ },
1804
+ {
1805
+ "name": "Chapter 9, TikTok Business: the ads portal gives the business app its App ID and secret",
1806
+ "method": "POST",
1807
+ "path": "/_twin/app-credentials",
1808
+ "status": 201,
1809
+ "body": {},
1810
+ "capture": {
1811
+ "bid": "business_client_id",
1812
+ "bsec": "business_client_secret"
1813
+ }
1814
+ },
1815
+ {
1816
+ "name": "A business redirect URL without its trailing slash is refused",
1817
+ "method": "POST",
1818
+ "path": "/_twin/apps",
1819
+ "status": 400,
1820
+ "body": {
1821
+ "business_redirect_uris": [
1822
+ "https://postiz.tidewater.yoga/integrations/social/tiktok-business"
1823
+ ]
1824
+ }
1825
+ },
1826
+ {
1827
+ "name": "One with a port is refused",
1828
+ "method": "POST",
1829
+ "path": "/_twin/apps",
1830
+ "status": 400,
1831
+ "body": {
1832
+ "business_redirect_uris": [
1833
+ "https://postiz.tidewater.yoga:8443/cb/"
1834
+ ]
1835
+ }
1836
+ },
1837
+ {
1838
+ "name": "One with a query is refused",
1839
+ "method": "POST",
1840
+ "path": "/_twin/apps",
1841
+ "status": 400,
1842
+ "body": {
1843
+ "business_redirect_uris": [
1844
+ "https://postiz.tidewater.yoga/cb/?x=1"
1845
+ ]
1846
+ }
1847
+ },
1848
+ {
1849
+ "name": "An http one is refused",
1850
+ "method": "POST",
1851
+ "path": "/_twin/apps",
1852
+ "status": 400,
1853
+ "body": {
1854
+ "business_redirect_uris": [
1855
+ "http://postiz.tidewater.yoga/cb/"
1856
+ ]
1857
+ }
1858
+ },
1859
+ {
1860
+ "name": "A relative one is refused",
1861
+ "method": "POST",
1862
+ "path": "/_twin/apps",
1863
+ "status": 400,
1864
+ "body": {
1865
+ "business_redirect_uris": [
1866
+ "/cb/"
1867
+ ]
1868
+ }
1869
+ },
1870
+ {
1871
+ "name": "Eleven are too many",
1872
+ "method": "POST",
1873
+ "path": "/_twin/apps",
1874
+ "status": 400,
1875
+ "body": {
1876
+ "business_redirect_uris": [
1877
+ "https://postiz.tidewater.yoga/cb0/",
1878
+ "https://postiz.tidewater.yoga/cb1/",
1879
+ "https://postiz.tidewater.yoga/cb2/",
1880
+ "https://postiz.tidewater.yoga/cb3/",
1881
+ "https://postiz.tidewater.yoga/cb4/",
1882
+ "https://postiz.tidewater.yoga/cb5/",
1883
+ "https://postiz.tidewater.yoga/cb6/",
1884
+ "https://postiz.tidewater.yoga/cb7/",
1885
+ "https://postiz.tidewater.yoga/cb8/",
1886
+ "https://postiz.tidewater.yoga/cb9/",
1887
+ "https://postiz.tidewater.yoga/cb10/"
1888
+ ]
1889
+ }
1890
+ },
1891
+ {
1892
+ "name": "Postiz's business redirect URL",
1893
+ "method": "POST",
1894
+ "path": "/_twin/apps",
1895
+ "status": 200,
1896
+ "body": {
1897
+ "business_redirect_uris": [
1898
+ "https://postiz.tidewater.yoga/integrations/social/tiktok-business/"
1899
+ ]
1900
+ },
1901
+ "expect": [
1902
+ {
1903
+ "path": "business_redirect_uris.0",
1904
+ "equals": "https://postiz.tidewater.yoga/integrations/social/tiktok-business/"
1905
+ }
1906
+ ]
1907
+ },
1908
+ {
1909
+ "name": "Maya connects the business account: she logs in",
1910
+ "method": "POST",
1911
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
1912
+ "status": 200,
1913
+ "headers": {
1914
+ "content-type": "application/x-www-form-urlencoded"
1915
+ },
1916
+ "body": "client_key={bid}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok-business%2F&state=b1&response_type=code&disable_auto_auth=1&scope=user.info.basic%2Cuser.info.username%2Cuser.info.stats%2Cvideo.list%2Cvideo.upload%2Cvideo.publish&username=tidewateryoga&password=savasana-2026",
1917
+ "expect": [
1918
+ {
1919
+ "path": "",
1920
+ "contains": "would like to access"
1921
+ }
1922
+ ]
1923
+ },
1924
+ {
1925
+ "name": "She authorizes",
1926
+ "method": "POST",
1927
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
1928
+ "status": 302,
1929
+ "headers": {
1930
+ "content-type": "application/x-www-form-urlencoded"
1931
+ },
1932
+ "body": "client_key={bid}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok-business%2F&state=b1&response_type=code&disable_auto_auth=1&scope=user.info.basic%2Cuser.info.username%2Cuser.info.stats%2Cvideo.list%2Cvideo.upload%2Cvideo.publish&username=tidewateryoga&password=savasana-2026&decision=authorize",
1933
+ "capture": {
1934
+ "bcode": "redirect.code"
1935
+ },
1936
+ "expect": [
1937
+ {
1938
+ "path": "redirect.scopes",
1939
+ "equals": "user.info.basic,user.info.username,user.info.stats,video.list,video.upload,video.publish"
1940
+ }
1941
+ ]
1942
+ },
1943
+ {
1944
+ "name": "A wrong secret: 40131",
1945
+ "method": "POST",
1946
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
1947
+ "status": 200,
1948
+ "headers": {
1949
+ "content-type": "application/json"
1950
+ },
1951
+ "body": {
1952
+ "client_id": "{bid}",
1953
+ "client_secret": "wrong",
1954
+ "grant_type": "authorization_code",
1955
+ "auth_code": "{bcode}",
1956
+ "redirect_uri": "https://postiz.tidewater.yoga/integrations/social/tiktok-business/"
1957
+ },
1958
+ "expect": [
1959
+ {
1960
+ "path": "code",
1961
+ "equals": 40131
1962
+ }
1963
+ ]
1964
+ },
1965
+ {
1966
+ "name": "A grant type other than authorization_code: 40002",
1967
+ "method": "POST",
1968
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
1969
+ "status": 200,
1970
+ "headers": {
1971
+ "content-type": "application/json"
1972
+ },
1973
+ "body": {
1974
+ "client_id": "{bid}",
1975
+ "client_secret": "{bsec}",
1976
+ "grant_type": "password",
1977
+ "auth_code": "{bcode}"
1978
+ },
1979
+ "expect": [
1980
+ {
1981
+ "path": "code",
1982
+ "equals": 40002
1983
+ }
1984
+ ]
1985
+ },
1986
+ {
1987
+ "name": "A code TikTok never gave: 40110",
1988
+ "method": "POST",
1989
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
1990
+ "status": 200,
1991
+ "headers": {
1992
+ "content-type": "application/json"
1993
+ },
1994
+ "body": {
1995
+ "client_id": "{bid}",
1996
+ "client_secret": "{bsec}",
1997
+ "grant_type": "authorization_code",
1998
+ "auth_code": "nope"
1999
+ },
2000
+ "expect": [
2001
+ {
2002
+ "path": "code",
2003
+ "equals": 40110
2004
+ }
2005
+ ]
2006
+ },
2007
+ {
2008
+ "name": "Another redirect URL: 40002",
2009
+ "method": "POST",
2010
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
2011
+ "status": 200,
2012
+ "headers": {
2013
+ "content-type": "application/json"
2014
+ },
2015
+ "body": {
2016
+ "client_id": "{bid}",
2017
+ "client_secret": "{bsec}",
2018
+ "grant_type": "authorization_code",
2019
+ "auth_code": "{bcode}",
2020
+ "redirect_uri": "https://elsewhere.example/cb/"
2021
+ },
2022
+ "expect": [
2023
+ {
2024
+ "path": "code",
2025
+ "equals": 40002
2026
+ }
2027
+ ]
2028
+ },
2029
+ {
2030
+ "name": "Postiz trades the code",
2031
+ "method": "POST",
2032
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
2033
+ "status": 200,
2034
+ "headers": {
2035
+ "content-type": "application/json"
2036
+ },
2037
+ "body": {
2038
+ "client_id": "{bid}",
2039
+ "client_secret": "{bsec}",
2040
+ "grant_type": "authorization_code",
2041
+ "auth_code": "{bcode}",
2042
+ "redirect_uri": "https://postiz.tidewater.yoga/integrations/social/tiktok-business/"
2043
+ },
2044
+ "capture": {
2045
+ "bat": "data.access_token",
2046
+ "brt": "data.refresh_token",
2047
+ "bopen": "data.open_id"
2048
+ },
2049
+ "expect": [
2050
+ {
2051
+ "path": "code",
2052
+ "equals": 0
2053
+ },
2054
+ {
2055
+ "path": "data.scope",
2056
+ "equals": "user.info.basic,user.info.username,user.info.stats,video.list,video.upload,video.publish"
2057
+ },
2058
+ {
2059
+ "path": "data.expires_in",
2060
+ "equals": 86400
2061
+ }
2062
+ ]
2063
+ },
2064
+ {
2065
+ "name": "An open-platform token is not the business API's",
2066
+ "method": "GET",
2067
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}",
2068
+ "status": 200,
2069
+ "headers": {
2070
+ "access-token": "{rat}"
2071
+ },
2072
+ "expect": [
2073
+ {
2074
+ "path": "code",
2075
+ "equals": 40105
2076
+ }
2077
+ ]
2078
+ },
2079
+ {
2080
+ "name": "No Access-Token: 40104",
2081
+ "method": "GET",
2082
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}",
2083
+ "status": 200,
2084
+ "expect": [
2085
+ {
2086
+ "path": "code",
2087
+ "equals": 40104
2088
+ }
2089
+ ]
2090
+ },
2091
+ {
2092
+ "name": "Another account's business_id: 40001",
2093
+ "method": "GET",
2094
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id=someone-else",
2095
+ "status": 200,
2096
+ "headers": {
2097
+ "access-token": "{bat}"
2098
+ },
2099
+ "expect": [
2100
+ {
2101
+ "path": "code",
2102
+ "equals": 40001
2103
+ }
2104
+ ]
2105
+ },
2106
+ {
2107
+ "name": "Fields that are not a JSON array: 40002",
2108
+ "method": "GET",
2109
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}&fields=username",
2110
+ "status": 200,
2111
+ "headers": {
2112
+ "access-token": "{bat}"
2113
+ },
2114
+ "expect": [
2115
+ {
2116
+ "path": "code",
2117
+ "equals": 40002
2118
+ }
2119
+ ]
2120
+ },
2121
+ {
2122
+ "name": "A field the profile does not have: 40002",
2123
+ "method": "GET",
2124
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}&fields=%5B%22shoe_size%22%5D",
2125
+ "status": 200,
2126
+ "headers": {
2127
+ "access-token": "{bat}"
2128
+ },
2129
+ "expect": [
2130
+ {
2131
+ "path": "code",
2132
+ "equals": 40002
2133
+ }
2134
+ ]
2135
+ },
2136
+ {
2137
+ "name": "The default fields",
2138
+ "method": "GET",
2139
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}",
2140
+ "status": 200,
2141
+ "headers": {
2142
+ "access-token": "{bat}"
2143
+ },
2144
+ "expect": [
2145
+ {
2146
+ "path": "data.display_name",
2147
+ "equals": "Tidewater Yoga"
2148
+ },
2149
+ {
2150
+ "path": "data.profile_image",
2151
+ "contains": "/_twin/media/avatar-"
2152
+ }
2153
+ ]
2154
+ },
2155
+ {
2156
+ "name": "Postiz names the account",
2157
+ "method": "GET",
2158
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}&fields=%5B%22username%22%2C%20%22display_name%22%2C%20%22profile_image%22%5D",
2159
+ "status": 200,
2160
+ "headers": {
2161
+ "access-token": "{bat}"
2162
+ },
2163
+ "expect": [
2164
+ {
2165
+ "path": "data.username",
2166
+ "equals": "tidewateryoga"
2167
+ }
2168
+ ]
2169
+ },
2170
+ {
2171
+ "name": "And reads its analytics",
2172
+ "method": "GET",
2173
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={bopen}&fields=%5B%22followers_count%22%2C%20%22following_count%22%2C%20%22total_likes%22%2C%20%22videos_count%22%5D",
2174
+ "status": 200,
2175
+ "headers": {
2176
+ "access-token": "{bat}"
2177
+ },
2178
+ "expect": [
2179
+ {
2180
+ "path": "data.followers_count",
2181
+ "equals": 1240
2182
+ },
2183
+ {
2184
+ "path": "data.total_likes",
2185
+ "equals": 9800
2186
+ },
2187
+ {
2188
+ "path": "data.videos_count",
2189
+ "equals": 1
2190
+ }
2191
+ ]
2192
+ },
2193
+ {
2194
+ "name": "Its posts' counts",
2195
+ "method": "GET",
2196
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&fields=%5B%22item_id%22%2C%20%22likes%22%2C%20%22comments%22%2C%20%22shares%22%2C%20%22video_views%22%5D&max_count=20",
2197
+ "status": 200,
2198
+ "headers": {
2199
+ "access-token": "{bat}"
2200
+ },
2201
+ "expect": [
2202
+ {
2203
+ "path": "data.videos.0.item_id",
2204
+ "equals": "{vid}"
2205
+ },
2206
+ {
2207
+ "path": "data.videos.0.video_views",
2208
+ "equals": 1200
2209
+ },
2210
+ {
2211
+ "path": "data.has_more",
2212
+ "equals": false
2213
+ }
2214
+ ]
2215
+ },
2216
+ {
2217
+ "name": "Fields without item_id: 40002",
2218
+ "method": "GET",
2219
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&fields=%5B%22likes%22%5D",
2220
+ "status": 200,
2221
+ "headers": {
2222
+ "access-token": "{bat}"
2223
+ },
2224
+ "expect": [
2225
+ {
2226
+ "path": "code",
2227
+ "equals": 40002
2228
+ }
2229
+ ]
2230
+ },
2231
+ {
2232
+ "name": "Fields not a JSON array: 40002",
2233
+ "method": "GET",
2234
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&fields=item_id",
2235
+ "status": 200,
2236
+ "headers": {
2237
+ "access-token": "{bat}"
2238
+ },
2239
+ "expect": [
2240
+ {
2241
+ "path": "code",
2242
+ "equals": 40002
2243
+ }
2244
+ ]
2245
+ },
2246
+ {
2247
+ "name": "A page over 20: 40002",
2248
+ "method": "GET",
2249
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&max_count=50",
2250
+ "status": 200,
2251
+ "headers": {
2252
+ "access-token": "{bat}"
2253
+ },
2254
+ "expect": [
2255
+ {
2256
+ "path": "code",
2257
+ "equals": 40002
2258
+ }
2259
+ ]
2260
+ },
2261
+ {
2262
+ "name": "Posts before the first one: none",
2263
+ "method": "GET",
2264
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&cursor=1768800000",
2265
+ "status": 200,
2266
+ "headers": {
2267
+ "access-token": "{bat}"
2268
+ },
2269
+ "expect": [
2270
+ {
2271
+ "path": "data.videos",
2272
+ "equals": []
2273
+ }
2274
+ ]
2275
+ },
2276
+ {
2277
+ "name": "TikTok knows a location near the studio",
2278
+ "method": "POST",
2279
+ "path": "/_twin/locations",
2280
+ "status": 201,
2281
+ "body": {
2282
+ "location_name": "Tidewater Yoga",
2283
+ "location_address": "12 Harbor Street, Portland ME"
2284
+ }
2285
+ },
2286
+ {
2287
+ "name": "A location needs a name",
2288
+ "method": "POST",
2289
+ "path": "/_twin/locations",
2290
+ "status": 400,
2291
+ "body": {}
2292
+ },
2293
+ {
2294
+ "name": "Two tracks in the Commercial Music Library",
2295
+ "method": "POST",
2296
+ "path": "/_twin/tracks",
2297
+ "status": 201,
2298
+ "body": {
2299
+ "name": "Sunrise Drift",
2300
+ "artist": "Kai Loma",
2301
+ "genre": "ambient",
2302
+ "duration": 62
2303
+ },
2304
+ "capture": {
2305
+ "clip": "song_clip_id"
2306
+ }
2307
+ },
2308
+ {
2309
+ "name": "…the second",
2310
+ "method": "POST",
2311
+ "path": "/_twin/tracks",
2312
+ "status": 201,
2313
+ "body": {
2314
+ "name": "Morning Bounce",
2315
+ "artist": "The Lanterns"
2316
+ }
2317
+ },
2318
+ {
2319
+ "name": "A track needs a name and an artist",
2320
+ "method": "POST",
2321
+ "path": "/_twin/tracks",
2322
+ "status": 400,
2323
+ "body": {
2324
+ "name": "x"
2325
+ }
2326
+ },
2327
+ {
2328
+ "name": "Postiz searches for the location",
2329
+ "method": "GET",
2330
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/location/?business_id={bopen}&search_query=harbor",
2331
+ "status": 200,
2332
+ "headers": {
2333
+ "access-token": "{bat}"
2334
+ },
2335
+ "expect": [
2336
+ {
2337
+ "path": "data.locations.0.location_name",
2338
+ "equals": "Tidewater Yoga"
2339
+ }
2340
+ ]
2341
+ },
2342
+ {
2343
+ "name": "A search over 100 characters: 40002",
2344
+ "method": "GET",
2345
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/location/?business_id={bopen}&search_query=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
2346
+ "status": 200,
2347
+ "headers": {
2348
+ "access-token": "{bat}"
2349
+ },
2350
+ "expect": [
2351
+ {
2352
+ "path": "code",
2353
+ "equals": 40002
2354
+ }
2355
+ ]
2356
+ },
2357
+ {
2358
+ "name": "Popular tracks (ALL)",
2359
+ "method": "GET",
2360
+ "path": "https://business-api.tiktok.com/open_api/v1.3/discovery/cml/trending_list/?business_id={bopen}&genre=ALL",
2361
+ "status": 200,
2362
+ "headers": {
2363
+ "access-token": "{bat}"
2364
+ },
2365
+ "expect": [
2366
+ {
2367
+ "path": "data.list.1.commercial_music_name",
2368
+ "equals": "Morning Bounce"
2369
+ }
2370
+ ]
2371
+ },
2372
+ {
2373
+ "name": "Ambient tracks",
2374
+ "method": "GET",
2375
+ "path": "https://business-api.tiktok.com/open_api/v1.3/discovery/cml/trending_list/?business_id={bopen}&genre=ambient",
2376
+ "status": 200,
2377
+ "headers": {
2378
+ "access-token": "{bat}"
2379
+ },
2380
+ "expect": [
2381
+ {
2382
+ "path": "data.list.0.full_duration_song_clip.song_clip_id",
2383
+ "equals": "{clip}"
2384
+ },
2385
+ {
2386
+ "path": "data.list.1",
2387
+ "exists": false
2388
+ }
2389
+ ]
2390
+ },
2391
+ {
2392
+ "name": "A video with no URL: 40002",
2393
+ "method": "POST",
2394
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/publish/",
2395
+ "status": 200,
2396
+ "headers": {
2397
+ "access-token": "{bat}",
2398
+ "content-type": "application/json"
2399
+ },
2400
+ "body": {
2401
+ "business_id": "{bopen}",
2402
+ "post_info": {}
2403
+ },
2404
+ "expect": [
2405
+ {
2406
+ "path": "code",
2407
+ "equals": 40002
2408
+ }
2409
+ ]
2410
+ },
2411
+ {
2412
+ "name": "A video with no post_info: 40002",
2413
+ "method": "POST",
2414
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/publish/",
2415
+ "status": 200,
2416
+ "headers": {
2417
+ "access-token": "{bat}",
2418
+ "content-type": "application/json"
2419
+ },
2420
+ "body": {
2421
+ "business_id": "{bopen}",
2422
+ "video_url": "https://media.tidewater.yoga/v.mp4"
2423
+ },
2424
+ "expect": [
2425
+ {
2426
+ "path": "code",
2427
+ "equals": 40002
2428
+ }
2429
+ ]
2430
+ },
2431
+ {
2432
+ "name": "post_info without its two required toggles: 40002",
2433
+ "method": "POST",
2434
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/publish/",
2435
+ "status": 200,
2436
+ "headers": {
2437
+ "access-token": "{bat}",
2438
+ "content-type": "application/json"
2439
+ },
2440
+ "body": {
2441
+ "business_id": "{bopen}",
2442
+ "video_url": "https://media.tidewater.yoga/v.mp4",
2443
+ "post_info": {
2444
+ "caption": "x"
2445
+ }
2446
+ },
2447
+ "expect": [
2448
+ {
2449
+ "path": "code",
2450
+ "equals": 40002
2451
+ }
2452
+ ]
2453
+ },
2454
+ {
2455
+ "name": "Postiz publishes a video by URL, with its location and track; the studio media transport disconnects",
2456
+ "method": "POST",
2457
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/publish/",
2458
+ "status": 200,
2459
+ "headers": {
2460
+ "access-token": "{bat}",
2461
+ "content-type": "application/json"
2462
+ },
2463
+ "body": {
2464
+ "business_id": "{bopen}",
2465
+ "video_url": "https://media.tidewater.yoga/spring.mp4",
2466
+ "post_info": {
2467
+ "caption": "Spring flow",
2468
+ "is_brand_organic": false,
2469
+ "is_branded_content": false,
2470
+ "disable_comment": false,
2471
+ "disable_duet": false,
2472
+ "disable_stitch": false,
2473
+ "music_sound_info": {
2474
+ "music_sound_id": "{clip}",
2475
+ "music_sound_volume": 50,
2476
+ "video_original_sound_volume": 50
2477
+ }
2478
+ }
2479
+ },
2480
+ "capture": {
2481
+ "sid": "data.share_id"
2482
+ },
2483
+ "expect": [
2484
+ {
2485
+ "path": "code",
2486
+ "equals": 0
2487
+ }
2488
+ ]
2489
+ },
2490
+ {
2491
+ "name": "The interrupted media body becomes FAILED with video_pull_failed",
2492
+ "method": "GET",
2493
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/status/?business_id={bopen}&publish_id={sid}",
2494
+ "status": 200,
2495
+ "headers": {
2496
+ "access-token": "{bat}"
2497
+ },
2498
+ "expect": [
2499
+ {
2500
+ "path": "data.status",
2501
+ "equals": "FAILED"
2502
+ },
2503
+ {
2504
+ "path": "data.reason",
2505
+ "equals": "video_pull_failed"
2506
+ }
2507
+ ]
2508
+ },
2509
+ {
2510
+ "name": "Postiz publishes the studio’s next video; its media server supplies the bytes (tiktok.business.provider.ts:666-691)",
2511
+ "method": "POST",
2512
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/publish/",
2513
+ "status": 200,
2514
+ "headers": {
2515
+ "access-token": "{bat}",
2516
+ "content-type": "application/json"
2517
+ },
2518
+ "body": {
2519
+ "business_id": "{bopen}",
2520
+ "video_url": "https://media.tidewater.yoga/summer.mp4",
2521
+ "post_info": {
2522
+ "caption": "Summer flow",
2523
+ "is_brand_organic": false,
2524
+ "is_branded_content": false,
2525
+ "disable_comment": false,
2526
+ "disable_duet": false,
2527
+ "disable_stitch": false,
2528
+ "music_sound_info": {
2529
+ "music_sound_id": "{clip}",
2530
+ "music_sound_volume": 50,
2531
+ "video_original_sound_volume": 50
2532
+ }
2533
+ }
2534
+ },
2535
+ "capture": {
2536
+ "summerSid": "data.share_id"
2537
+ },
2538
+ "expect": [
2539
+ {
2540
+ "path": "code",
2541
+ "equals": 0
2542
+ }
2543
+ ]
2544
+ },
2545
+ {
2546
+ "name": "The Business pull completed and gave Postiz a public video",
2547
+ "method": "GET",
2548
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/status/?business_id={bopen}&publish_id={summerSid}",
2549
+ "status": 200,
2550
+ "headers": {
2551
+ "access-token": "{bat}"
2552
+ },
2553
+ "expect": [
2554
+ {
2555
+ "path": "data.status",
2556
+ "equals": "PUBLISH_COMPLETE"
2557
+ }
2558
+ ],
2559
+ "capture": {
2560
+ "summerVid": "data.post_ids.0"
2561
+ }
2562
+ },
2563
+ {
2564
+ "name": "Postiz reads the new public video and its zero initial counts from Business analytics",
2565
+ "method": "GET",
2566
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/video/list/?business_id={bopen}&fields=[\"item_id\",\"caption\",\"video_views\",\"likes\",\"comments\",\"shares\"]&max_count=20",
2567
+ "status": 200,
2568
+ "headers": {
2569
+ "access-token": "{bat}"
2570
+ },
2571
+ "expect": [
2572
+ {
2573
+ "path": "data.videos.0.item_id",
2574
+ "equals": "{summerVid}"
2575
+ },
2576
+ {
2577
+ "path": "data.videos.0.caption",
2578
+ "equals": "Summer flow"
2579
+ },
2580
+ {
2581
+ "path": "data.videos.0.video_views",
2582
+ "equals": 0
2583
+ },
2584
+ {
2585
+ "path": "data.videos.1.item_id",
2586
+ "equals": "{vid}"
2587
+ }
2588
+ ]
2589
+ },
2590
+ {
2591
+ "name": "A publishing task TikTok never gave: 40002",
2592
+ "method": "GET",
2593
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/status/?business_id={bopen}&publish_id=v_pub_url~v2.999",
2594
+ "status": 200,
2595
+ "headers": {
2596
+ "access-token": "{bat}"
2597
+ },
2598
+ "expect": [
2599
+ {
2600
+ "path": "code",
2601
+ "equals": 40002
2602
+ }
2603
+ ]
2604
+ },
2605
+ {
2606
+ "name": "No photos: 40002",
2607
+ "method": "POST",
2608
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2609
+ "status": 200,
2610
+ "headers": {
2611
+ "access-token": "{bat}",
2612
+ "content-type": "application/json"
2613
+ },
2614
+ "body": {
2615
+ "business_id": "{bopen}",
2616
+ "photo_images": [],
2617
+ "post_info": {
2618
+ "is_brand_organic": false,
2619
+ "is_branded_content": false
2620
+ }
2621
+ },
2622
+ "expect": [
2623
+ {
2624
+ "path": "code",
2625
+ "equals": 40002
2626
+ }
2627
+ ]
2628
+ },
2629
+ {
2630
+ "name": "A cover index past the photos: 40002",
2631
+ "method": "POST",
2632
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2633
+ "status": 200,
2634
+ "headers": {
2635
+ "access-token": "{bat}",
2636
+ "content-type": "application/json"
2637
+ },
2638
+ "body": {
2639
+ "business_id": "{bopen}",
2640
+ "photo_images": [
2641
+ "https://media.tidewater.yoga/a.jpg"
2642
+ ],
2643
+ "photo_cover_index": 2,
2644
+ "post_info": {
2645
+ "is_brand_organic": false,
2646
+ "is_branded_content": false
2647
+ }
2648
+ },
2649
+ "expect": [
2650
+ {
2651
+ "path": "code",
2652
+ "equals": 40002
2653
+ }
2654
+ ]
2655
+ },
2656
+ {
2657
+ "name": "Photos without the toggles: 40002",
2658
+ "method": "POST",
2659
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2660
+ "status": 200,
2661
+ "headers": {
2662
+ "access-token": "{bat}",
2663
+ "content-type": "application/json"
2664
+ },
2665
+ "body": {
2666
+ "business_id": "{bopen}",
2667
+ "photo_images": [
2668
+ "https://media.tidewater.yoga/a.jpg"
2669
+ ],
2670
+ "post_info": {}
2671
+ },
2672
+ "expect": [
2673
+ {
2674
+ "path": "code",
2675
+ "equals": 40002
2676
+ }
2677
+ ]
2678
+ },
2679
+ {
2680
+ "name": "A title over 90: 40002",
2681
+ "method": "POST",
2682
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2683
+ "status": 200,
2684
+ "headers": {
2685
+ "access-token": "{bat}",
2686
+ "content-type": "application/json"
2687
+ },
2688
+ "body": {
2689
+ "business_id": "{bopen}",
2690
+ "photo_images": [
2691
+ "https://media.tidewater.yoga/a.jpg"
2692
+ ],
2693
+ "post_info": {
2694
+ "title": "ttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttttt",
2695
+ "privacy_level": "PUBLIC_TO_EVERYONE",
2696
+ "is_brand_organic": false,
2697
+ "is_branded_content": false
2698
+ }
2699
+ },
2700
+ "expect": [
2701
+ {
2702
+ "path": "code",
2703
+ "equals": 40002
2704
+ }
2705
+ ]
2706
+ },
2707
+ {
2708
+ "name": "A privacy level not offered: 40002",
2709
+ "method": "POST",
2710
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2711
+ "status": 200,
2712
+ "headers": {
2713
+ "access-token": "{bat}",
2714
+ "content-type": "application/json"
2715
+ },
2716
+ "body": {
2717
+ "business_id": "{bopen}",
2718
+ "photo_images": [
2719
+ "https://media.tidewater.yoga/a.jpg"
2720
+ ],
2721
+ "post_info": {
2722
+ "privacy_level": "FOLLOWER_OF_CREATOR",
2723
+ "is_brand_organic": false,
2724
+ "is_branded_content": false
2725
+ }
2726
+ },
2727
+ "expect": [
2728
+ {
2729
+ "path": "code",
2730
+ "equals": 40002
2731
+ }
2732
+ ]
2733
+ },
2734
+ {
2735
+ "name": "Photos saved as a draft",
2736
+ "method": "POST",
2737
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/photo/publish/",
2738
+ "status": 200,
2739
+ "headers": {
2740
+ "access-token": "{bat}",
2741
+ "content-type": "application/json"
2742
+ },
2743
+ "body": {
2744
+ "business_id": "{bopen}",
2745
+ "photo_images": [
2746
+ "https://media.tidewater.yoga/a.jpg",
2747
+ "https://media.tidewater.yoga/b.jpg"
2748
+ ],
2749
+ "photo_cover_index": 1,
2750
+ "post_info": {
2751
+ "title": "Spring",
2752
+ "caption": "Spring flow",
2753
+ "is_brand_organic": false,
2754
+ "is_branded_content": false,
2755
+ "is_draft": true
2756
+ }
2757
+ },
2758
+ "capture": {
2759
+ "sid2": "data.share_id"
2760
+ },
2761
+ "expect": [
2762
+ {
2763
+ "path": "data.share_id",
2764
+ "contains": "p_pub_url"
2765
+ }
2766
+ ]
2767
+ },
2768
+ {
2769
+ "name": "Its pull failed as well",
2770
+ "method": "GET",
2771
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/status/?business_id={bopen}&publish_id={sid2}",
2772
+ "status": 200,
2773
+ "headers": {
2774
+ "access-token": "{bat}"
2775
+ },
2776
+ "expect": [
2777
+ {
2778
+ "path": "data.status",
2779
+ "equals": "FAILED"
2780
+ },
2781
+ {
2782
+ "path": "data.reason",
2783
+ "equals": "photo_pull_failed"
2784
+ }
2785
+ ]
2786
+ },
2787
+ {
2788
+ "name": "Jonah connects his business account too",
2789
+ "method": "POST",
2790
+ "path": "https://www.tiktok.com/v2/auth/authorize/",
2791
+ "status": 302,
2792
+ "headers": {
2793
+ "content-type": "application/x-www-form-urlencoded"
2794
+ },
2795
+ "body": "client_key={bid}&redirect_uri=https%3A%2F%2Fpostiz.tidewater.yoga%2Fintegrations%2Fsocial%2Ftiktok-business%2F&state=j2&response_type=code&disable_auto_auth=1&scope=user.info.basic%2Cuser.info.username%2Cuser.info.stats%2Cvideo.list%2Cvideo.upload%2Cvideo.publish&username=jonah.teaches&password=warrior-two&decision=authorize",
2796
+ "capture": {
2797
+ "jbcode": "redirect.code"
2798
+ }
2799
+ },
2800
+ {
2801
+ "name": "His token",
2802
+ "method": "POST",
2803
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/token/",
2804
+ "status": 200,
2805
+ "headers": {
2806
+ "content-type": "application/json"
2807
+ },
2808
+ "body": {
2809
+ "client_id": "{bid}",
2810
+ "client_secret": "{bsec}",
2811
+ "grant_type": "authorization_code",
2812
+ "auth_code": "{jbcode}",
2813
+ "redirect_uri": "https://postiz.tidewater.yoga/integrations/social/tiktok-business/"
2814
+ },
2815
+ "capture": {
2816
+ "jbat": "data.access_token",
2817
+ "jbopen": "data.open_id"
2818
+ }
2819
+ },
2820
+ {
2821
+ "name": "Maya's publishing task is not his: 40001",
2822
+ "method": "GET",
2823
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/publish/status/?business_id={jbopen}&publish_id={sid}",
2824
+ "status": 200,
2825
+ "headers": {
2826
+ "access-token": "{jbat}"
2827
+ },
2828
+ "expect": [
2829
+ {
2830
+ "path": "code",
2831
+ "equals": 40001
2832
+ }
2833
+ ]
2834
+ },
2835
+ {
2836
+ "name": "Postiz refreshes the business token",
2837
+ "method": "POST",
2838
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/refresh_token/",
2839
+ "status": 200,
2840
+ "headers": {
2841
+ "content-type": "application/json"
2842
+ },
2843
+ "body": {
2844
+ "client_id": "{bid}",
2845
+ "client_secret": "{bsec}",
2846
+ "grant_type": "refresh_token",
2847
+ "refresh_token": "{brt}"
2848
+ },
2849
+ "expect": [
2850
+ {
2851
+ "path": "code",
2852
+ "equals": 0
2853
+ }
2854
+ ]
2855
+ },
2856
+ {
2857
+ "name": "The spent refresh token: 40107",
2858
+ "method": "POST",
2859
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/refresh_token/",
2860
+ "status": 200,
2861
+ "headers": {
2862
+ "content-type": "application/json"
2863
+ },
2864
+ "body": {
2865
+ "client_id": "{bid}",
2866
+ "client_secret": "{bsec}",
2867
+ "grant_type": "refresh_token",
2868
+ "refresh_token": "{brt}"
2869
+ },
2870
+ "expect": [
2871
+ {
2872
+ "path": "code",
2873
+ "equals": 40107
2874
+ }
2875
+ ]
2876
+ },
2877
+ {
2878
+ "name": "A refresh with the wrong grant type: 40002",
2879
+ "method": "POST",
2880
+ "path": "https://business-api.tiktok.com/open_api/v1.3/tt_user/oauth2/refresh_token/",
2881
+ "status": 200,
2882
+ "headers": {
2883
+ "content-type": "application/json"
2884
+ },
2885
+ "body": {
2886
+ "client_id": "{bid}",
2887
+ "client_secret": "{bsec}",
2888
+ "grant_type": "authorization_code",
2889
+ "refresh_token": "{brt}"
2890
+ },
2891
+ "expect": [
2892
+ {
2893
+ "path": "code",
2894
+ "equals": 40002
2895
+ }
2896
+ ]
2897
+ },
2898
+ {
2899
+ "name": "A day later",
2900
+ "wait": "1441m"
2901
+ },
2902
+ {
2903
+ "name": "Jonah's unrefreshed token has expired: 40102",
2904
+ "method": "GET",
2905
+ "path": "https://business-api.tiktok.com/open_api/v1.3/business/get/?business_id={jbopen}",
2906
+ "status": 200,
2907
+ "headers": {
2908
+ "access-token": "{jbat}"
2909
+ },
2910
+ "expect": [
2911
+ {
2912
+ "path": "code",
2913
+ "equals": 40102
2914
+ }
2915
+ ]
2916
+ },
2917
+ {
2918
+ "name": "No token is refused",
2919
+ "method": "GET",
2920
+ "path": "https://open.tiktokapis.com/v2/user/info/?fields=open_id",
2921
+ "status": 401,
2922
+ "expect": [
2923
+ {
2924
+ "path": "error.code",
2925
+ "equals": "access_token_invalid"
2926
+ }
2927
+ ]
2928
+ }
2929
+ ],
2930
+ "application": [
2931
+ {
2932
+ "method": "GET",
2933
+ "url": "https://media.tidewater.yoga/spring.mp4",
2934
+ "status": 200,
2935
+ "headers": {
2936
+ "content-type": "video/mp4"
2937
+ },
2938
+ "bodyError": "The studio media server disconnected during the video download"
2939
+ },
2940
+ {
2941
+ "method": "GET",
2942
+ "url": "https://media.tidewater.yoga/summer.mp4",
2943
+ "status": 200,
2944
+ "headers": {
2945
+ "content-type": "video/mp4"
2946
+ },
2947
+ "body": "\u0000\u0000\u0000\u0018ftypisom\u0000\u0000\u0000\u0000isommp41\u0000\u0000\u0000$moov\u0000\u0000\u0000\u001cmvhd\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u001e"
2948
+ }
2949
+ ]
2950
+ }