Fabian_Quiroga | 2021-12-23 13:55:51 UTC | #1
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?
Jerome.Saint-Marc | 2021-12-23 18:08:27 UTC | #2
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,
system | 2022-01-23 15:45:41 UTC | #3
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 13039