What is up with "use node" fetch?
I keep getting this dumb response when I try using the tiktok api from a convex use node action. When I use reqbin with the identical request it goes through perfectly fine
Is there some weird default header or something. I even ran it through two cors proxys to see if the IP address of the server, the convex action is on, is blacklisted.
I am lost
Tiktok response in text:
const upload = await (await fetch("https://open.tiktokapis.com/v2/post/publish/video/init/", {
method:"POST",
headers: {
"Authorization": `Bearer ${tiktokData.access_token}`,
"Content-Type": "application/json; charset=UTF-8",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
},
body: {
"post_info": {
"title": args.title,
"disable_duet": false,
"disable_comment": false,
"disable_stitch": false,
"video_cover_timestamp_ms": 0,
"privacy_level": "SELF_ONLY"
},
"source_info": {
"source": "PULL_FROM_URL",
"video_url": args.videoUrl
}
}
})).text();
console.log(upload);const upload = await (await fetch("https://open.tiktokapis.com/v2/post/publish/video/init/", {
method:"POST",
headers: {
"Authorization": `Bearer ${tiktokData.access_token}`,
"Content-Type": "application/json; charset=UTF-8",
"User-Agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36"
},
body: {
"post_info": {
"title": args.title,
"disable_duet": false,
"disable_comment": false,
"disable_stitch": false,
"video_cover_timestamp_ms": 0,
"privacy_level": "SELF_ONLY"
},
"source_info": {
"source": "PULL_FROM_URL",
"video_url": args.videoUrl
}
}
})).text();
console.log(upload);Is there some weird default header or something. I even ran it through two cors proxys to see if the IP address of the server, the convex action is on, is blacklisted.
I am lost
Tiktok response in text:
<HTML><HEAD><br/><TITLE>Access Denied</TITLE><br/></HEAD><BODY><br/><H1>Access Denied</H1><br/> <br/>You don't have permission to access "http://open.tiktokapis.com/v2/post/publish/video/init/" on this server.<P><br/>Reference #18.93c83017.1741929458.2296b32e<br/><P>https://errors.edgesuite.net/18.93c83017.1741929458.2296b32e</P><br/></BODY><br/></HTML><br/><HTML><HEAD><br/><TITLE>Access Denied</TITLE><br/></HEAD><BODY><br/><H1>Access Denied</H1><br/> <br/>You don't have permission to access "http://open.tiktokapis.com/v2/post/publish/video/init/" on this server.<P><br/>Reference #18.93c83017.1741929458.2296b32e<br/><P>https://errors.edgesuite.net/18.93c83017.1741929458.2296b32e</P><br/></BODY><br/></HTML><br/>
