How to convert this curl request?

curl -X POST https://api.video4u.com/v1/sites/{site_id}/media
-H ‘Authorization: Bearer {v1_api_secret}’
-H ‘Content-Type: application/json’
-d ‘{ “upload”: { “method”: “fetch”, “download_url”: “http://LinkToMyVideo.com/video.mp4” }, “metadata”: {“title”: “My Fetch Video”} }’

The blocks from @Riad_Developer is a good start. . However the content type should be application/json and the Web.Post method is missing
Also remove the single quote…

Taifun

1 Like

Good :sparkling_heart: @Taifun

You forgot to show us a screenshot of your relevant blocks

Taifun

In the Authorization value you forgot the word Bearer followed by a space… after that put your key

In the Web.PostText I would try a JSON value like this:

{ “upload”: { “method”: “fetch”, “download_url”: “http://LinkToMyVideo.com/video.mp4 ” }, “metadata”: {“title”: “My Fetch Video”} }

EDIT: also your site id looks strange in the url…

Taifun

Bearer space i try but not working

Protip: what about providing a screenshot of your updated blocks considering all the recommendations?
Taifun

curl -X POST ‘https://api.videos.com/v2/sites/{site_id}/media/
-H ‘Authorization: Bearer {api_v2_key}’
-H ‘Content-Type: application/json’
-d '{
“upload”: {
“method”: “external”,
“mime_type”: “video/mp4”,
“source_url”: “https://www.test.com/bubbles.mp4
},
“metadata”: {
“tags”: [
“dance_music”
],
“title”: “Bubbles”,
“description”: “A music video.”,
“category”: “Music and Audio”
}
}

Hello @Sultan_Beyt , Introducing Curl-to-Blocks, It converts curl requests into blocks

1 Like

I merged these 2 threads
they are almost identical
Learn from the already provided answers, try something and show us a screenshot of your relevant blocks…

As we can see, @Riad_Developer made the same errors again as previously…

Taifun