Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

199
Views
Can't post videos to Tiktok using the Web Video Kit API

I am trying to upload a video to Tiktok using this endpoint:

https://open-api.tiktok.com/share/video/upload/

Following the official docs: https://developers.tiktok.com/doc/web-video-kit-with-web

(After successfully authenticating with Tiktok and getting an access token using the Login Kit API). I am getting a response that suggests success (with error_code=0 and a non-empty share_id), however nothing gets uploaded and my Tiktok app's callback url does not seem to be getting triggered with any status update.

I've tried hitting the API from several different environments - a Node.js runtime (using Axios), a cURL request from 2 different machines (all getting the result described above) and also from my frontend code using Fetch (this one got me a CORS error). Code snippets below.

Will appreciate any help since I'm out of ideas as for what to try next. Also if there are any other docs or online resources besides the one I linked to that might be helpful, any links to such will be great.

Note: I made sure my test videos are satisfying the constraints mentioned in the docs.

My Node.js code:

    const url = `https://open-api.tiktok.com/share/video/upload?open_id=${openId}&access_token=${accessToken}`;
const data = new FormData();
data.append('video', fs.createReadStream(path.join(os.tmpdir(), 'test.mp4')));
await axios.post(url, data, {
  headers: data.getHeaders()
});

cURL request:

curl --location --request POST 'https://open-api.tiktok.com/share/video/upload?open_id=<open_id>&access_token=<access_token>' --form 'video=@"/path/to/video.mp4"'

Response payload (for both cURL and Node.JS requests):

{"data":{"err_code":0,"error_code":0,"share_id":"video.7031619168818448385.CGdXCmaC"},"extra":{"error_detail":"","logid":"2021111721133201024513311411A971D3"}}

Frontend code (Fetch, getting a 307 response with the same Tiktok URL (/share/video/upload...) in the Location header - resulting in CORS error):

const formData = new FormData();
formData.append('video', selectedFile);

const requestOptions = {
  method: 'POST',
  body: formData,
  redirect: 'follow'
};

const URL = `https://open-api.tiktok.com/share/video/upload?access_token=${accessToken}&open_id=${openId}`;

fetch(URL, requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.log('error', error));
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

You need to download the TikTok app then publish the video uploaded by your API.

The user who triggered the video upload should receive a notification on TikTok App after the video uploaded successfully and the user can publish the video on the app.

about 4 years ago · Juan Pablo Isaza Report

0

In case you get "Something went wrong, try again later". It is probably your region issue. You will need to try a vpn and try again.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!