Lakpriya Seneviratna commited on
Commit
7f04aa2
·
1 Parent(s): 06ceef1

chore: Update TikTok API endpoint in upload_video_to_tiktok function

Browse files
Files changed (1) hide show
  1. app.py +1 -9
app.py CHANGED
@@ -521,20 +521,12 @@ def upload_video_to_tiktok(access_token: str, video_file_path: str):
521
  try:
522
  video_size = os.path.getsize(video_file_path)
523
  init_response = requests.post(
524
- 'https://open.tiktokapis.com/v2/post/publish/video/init/',
525
  headers={
526
  'Authorization': f'Bearer {access_token}',
527
  'Content-Type': 'application/json; charset=UTF-8'
528
  },
529
  json={
530
- "post_info": {
531
- "title": "this will be a funny #cat video on your @tiktok #fyp",
532
- "privacy_level": "SELF_ONLY",
533
- "disable_duet": False,
534
- "disable_comment": True,
535
- "disable_stitch": False,
536
- "video_cover_timestamp_ms": 1000
537
- },
538
  "source_info": {
539
  "source": "FILE_UPLOAD",
540
  "video_size": video_size,
 
521
  try:
522
  video_size = os.path.getsize(video_file_path)
523
  init_response = requests.post(
524
+ 'https://open.tiktokapis.com/v2/post/publish/inbox/video/init/',
525
  headers={
526
  'Authorization': f'Bearer {access_token}',
527
  'Content-Type': 'application/json; charset=UTF-8'
528
  },
529
  json={
 
 
 
 
 
 
 
 
530
  "source_info": {
531
  "source": "FILE_UPLOAD",
532
  "video_size": video_size,