Error with sdk node

Hi,
when using this method getContentmanagementSharedSharedId that this documentation generates me this error
Code

const platformClient = require('purecloud-platform-client-v2');
const Token = require('./getToken');
const getUrl = async(sharedId) => {
const yourAccessToken = await Token();
platformClient.ApiClient.instance.setAccessToken(yourAccessToken);
let apiInstance = new platformClient.ContentManagementApi();
let opts = {
redirect: false
};
apiInstance.getContentmanagementSharedSharedId(sharedId, opts)
.then((data) => {
console.log(data);
//console.log(getContentmanagementSharedSharedId success! data: ${JSON.stringify(data, null, 2)});
})
.catch((err) => {
console.error('Hubo un error al llamar a getContentmanagementSharedSharedId');
console.error(err);
});
}
getUrl("u245ltbihjfyvnlmc3dzk4ezwm");

Origin
https://developer.genesys.cloud/api/rest/client-libraries/javascript/ContentManagementApi#getContentmanagementSharedSharedId

Error

I do not know what would be the error that my request has?

Hello,

I think the error comes from the redirect attribute in opts. I could reproduce a 400 error.

Try with the following ('false' value as string):

let opts = {
redirect: 'false'
};

Regards,

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.