UPDATE:
Thanks @lucas.spielberg, the sdk works and fixes the issue i was having. I am still not sure what was causing it.
@dazzatron my API key is for staging i was testing it on both staging and v1 incase it was wrong. they both produced the error message below. Also thank you for catching the application.json i fixed that and still also continued with a 400
I think it would be good to try and resolve the issue using axios.post() if possible. Ill post my template.js file and the error message:
const data = {
"timeline": {
"soundtrack": {
"src": "https://shotstack-assets.s3-ap-southeast-2.amazonaws.com/music/freepd/motions.mp3",
"effect": "fadeOut"
},
"background": "#000000",
"tracks": [
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/images/AROSS+Brand+logo+Intro.jpg"
},
"start": 0,
"length": 15,
"position": "bottomLeft",
"scale": 0.25,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/images/AROSS+Brand+logo+Intro.jpg"
},
"start": 21,
"length": 2,
"position": "bottomLeft",
"scale": 0.25,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/images/aross_Picture1+copy.jpg"
},
"start": 0,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "Alex Ross",
"style": "vogue",
"position": "center",
"size": "medium"
},
"start": 1,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 2,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "executive",
"style": "blockbuster",
"position": "topRight",
"size": "medium"
},
"start": 4,
"length": 2,
"transition": {
"in": "carouselLeft"
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 4,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "image",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/images/aross_Picture1+copy.jpg"
},
"start": 6,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 7,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 9,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "interviewer",
"style": "blockbuster",
"position": "topRight",
"size": "medium"
},
"start": 11,
"length": 4,
"transition": {
"in": "carouselLeft"
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 11,
"fit": "contain",
"length": 2
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 13,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "exPAT",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 15,
"length": 2,
"transition": {
"in": "fade"
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "conNECTOR",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 17,
"length": 1
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "interNATIONALIST",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 18,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "powerboat ENTHUSIAST",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 19,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "entREPRENEUR",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 20,
"length": 1,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 15,
"fit": "contain",
"length": 6,
"scale": 0.5,
"offset": {
"x": -0.25,
"y": -0.25
},
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 16,
"fit": "contain",
"length": 5,
"scale": 0.5,
"offset": {
"x": 0.25,
"y": -0.25
},
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 17,
"fit": "contain",
"length": 4,
"scale": 0.5,
"offset": {
"x": 0.25,
"y": 0.25
},
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 18,
"length": 3,
"scale": 0.5,
"offset": {
"x": -0.25,
"y": 0.25
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "video",
"src": "https://frostcm-images-and-videos.s3.us-east-2.amazonaws.com/videoClips/Time+Sqaure+1+(1).MOV"
},
"start": 21,
"length": 2,
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "Alex Ross",
"style": "blockbuster",
"position": "center",
"size": "medium"
},
"start": 23,
"length": 2,
"transition": {
"in": "fade"
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "Personal Brand Video",
"style": "subtitle",
"position": "bottom",
"size": "medium"
},
"start": 23,
"length": 2,
"transition": {
"in": "fade"
},
"fit": "contain"
}
]
},
{
"clips": [
{
"asset": {
"type": "title",
"text": "Frost Cool Media",
"style": "vogue",
"position": "center",
"size": "medium"
},
"start": 25,
"length": 5,
"transition": {
"in": "fade"
},
"fit": "contain"
}
]
}
]
},
"output": {
"format": "mp4",
"resolution": "sd",
"aspectRatio": "9:16"
},
// "callback": "localhost:8080/api/shotstack/render"
}
module.exports = data
ERROR:
Error: Request failed with status code 403
at createError (C:\Users\ngjus\Desktop\Coding\lambdaNode\node_modules\axios\lib\core\createError.js:16:15)
at settle (C:\Users\ngjus\Desktop\Coding\lambdaNode\node_modules\axios\lib\core\settle.js:17:12)
at IncomingMessage.handleStreamEnd (C:\Users\ngjus\Desktop\Coding\lambdaNode\node_modules\axios\lib\adapters\http.js:293:11)
at IncomingMessage.emit (events.js:412:35)
at IncomingMessage.emit (domain.js:470:12)
at endReadableNT (internal/streams/readable.js:1317:12)
at processTicksAndRejections (internal/process/task_queues.js:82:21)
then there is an extremely long console log for the returned object.