When using direct post :
I send this body to the endpoint :
const response = await fetch('/', {
method: 'POST',
headers: {
'Authorization': `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
post_info: {
title: "In titre",
privacy_level: "SELF_ONLY", // Options possibles: PUBLIC, PRIVATE, MUTUAL_FOLLOW_FRIENDS
disable_duet: false,
disable_comment: false,
disable_stitch: false,
video_cover_timestamp_ms: 1000
},
source_info: {
source: 'FILE_UPLOAD',
video_size: videoSize,
chunk_size: videoSize,
total_chunk_count: 1
}
}),
});
But I got :
{"error":{"code":"unaudited_client_can_only_post_to_private_accounts","message":"Please review our integration guidelines at /","log_id":"20250204173051E077C4622B4DD2060769"}}
I'm aware that as long as my app is in a sandbox I can't post a public video, but how to send it as a "draft" ?
The doc says private_level can be :
PUBLIC_TO_EVERYONE
MUTUAL_FOLLOW_FRIENDS
FOLLOWER_OF_CREATOR
SELF_ONLY
I thought SELF_ONLY means private
I can use the upload feature instead of "direct post" :
But I can't give a video description with those endpoints
Thanks