Add a YouTube video to the gallery
const url = 'https://api.gampeon.com/v1/projects/example/gallery/videos';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"example","caption":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/projects/example/gallery/videos \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "example", "caption": "example" }'Everyone who can edit the project (owner, or owners and admins of its studio). Links like https://www.youtube.com/watch?v=…, https://youtu.be/… or Shorts. The portal loads the video from youtube-nocookie.com only after a click.
Not available with access tokens.
Rate limit: 30 per hour per account.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Project slug
Request Bodyrequired
Section titled “Request Bodyrequired”object
YouTube link
Example generated
{ "url": "example", "caption": "example"}Responses
Section titled “Responses”Added at the end of the gallery
object
YouTube video ID (11 characters)
Example
{ "type": "image"}Error codes: invalid_field
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed, forbidden, project_hidden
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: gallery_full, video_exists
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: unsupported_video_url
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 30 per hour per account. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}