I am getting an internal server error when trying to save an asset to the content library.
let options = {
uri: '/asset/v1/content/assets',
json: true,
body: MCData
}
const RestClient = new FuelRest({auth: FuelAuthClient});
RestClient.post(options)
.then((result) => {
console.dir(result);
})
.catch((error) => {
console.dir(error);
})
The body of my request (MCData) is:
{
"name":"Document 123",
"assetType":{
"name":"png",
"id":28
},
"file":"data:image/png;base64, REST OF THE Encoded IMAGE HERE"
}
I can make a get request to the same endpoint (https://www.exacttargetapis.com/asset/v1/content/assets) and retrieve that I have no content (a correct response with a count of zero).
I am using the FuelSDK-Node-REST library. Error is
{ message: 'Internal Server Error',
errorcode: 0,
documentation: 'https://developer.salesforce.com/docs/atlas.en-us.mc-apis.meta/mc-apis/error-handling.htm' }