Tried using this with the Alpha 4.0 SDK.
The new SDK doesn't add restapi/v1.0/ to API requests automatically. When using the client with the 4.0 SDK, the URLs being used in the request all return 404.
As an example, in new 4.0,
await rcsdk.platform().get('/restapi/v1.0/account/~/extension/~')
.then(res => {
return res.json()
}).then(res => {
console.log(res.name)
}).catch(async e => {
// console.log(e.apiResponse)
let error = await e.response.json()
console.error(error)
})
Using the client, the following error is returned because the url is incomplete
{ url: 'https://platform.ringcentral.com/account/~',
status: 404,
statusText: 'Not Found',
headers: Headers { [Symbol(map)]: [Object] } } }
I've had a hard time working on the client on my own. Won't build, but was thinking that the constructor could have an option for modifying the url path? Or a flag for which SDK is being used?
Tried using this with the Alpha 4.0 SDK.
The new SDK doesn't add
restapi/v1.0/to API requests automatically. When using the client with the 4.0 SDK, the URLs being used in the request all return 404.As an example, in new 4.0,
Using the client, the following error is returned because the url is incomplete
I've had a hard time working on the client on my own. Won't build, but was thinking that the constructor could have an option for modifying the url path? Or a flag for which SDK is being used?