Incorrect channelId when importing video with API


I’m trying to use the api to import video, but I get an error {"errors":{"channelId":{"msg":"Should have correct video channel id","param":"channelId","location":"body"}}} when using /api/v1/videos/imports

Here’s the data i’m sending:

  "name": "What is PeerTube?",
  "licence": 1,
  "description": "My PeerTube channel:\\n\\nTake back the control of your videos! #JoinPeertube\\n\\nLet\'s fund PeerTube v1 together!. Help us acheive a decentralized video hosting network, based on free/libre software!",
  "nsfw": "false",
  "channelId": 7223,
  "originallyPublishedAt": "",
  "category": "entertainment",
  "privacy": "1",
  "language": null,
  "commentsEnabled": "true",
  "targetUrl": "",
  "waitTranscoding": "false",
  "tags": ["p2p", "streaming", "video", "decentralized", "federation", "network", "free", "libre", "gratis", "software", "bittorrent"]

I got the channel id from /api/v1/video-channels/<channel_name>/
I also set the headers with a bearer token for the owner of the channel.

What am I doing wrong ? :’(


I don’t know :thinking:

Did you try

Whooops, sorry, please ignore me, the problem was with my code, no data was actually being sent :upside_down_face: