Need to download call recordings from Engage Voice but getting an error at the highlighted line.
Authentication error when connecting to Engage Voice API
using (RestClient rc = new RestClient(clientID, secret, false ))
{
TokenInfo token = await rc.Authorize( "<user_name>" , "<ext>" , "<password>" );
var engageVoice = new EngageVoice.EngageVoice(); //
await engageVoice.Authorize(rc.token.access_token);
var httpResponseMessage = await engageVoice.Get( "/voice/api/v1/admin/accounts" );
var s = await httpResponseMessage.Content.ReadAsStringAsync();
Response error:
StatusCode: 401, ReasonPhrase: 'Unauthorized', Version: 1.1, Content: System.Net.Http.StreamContent, Headers:
{
content-security-policy: frame-ancestors 'none';
feature-policy: camera 'none';microphone 'self';geolocation 'none';encrypted-media 'none';payment 'none';speaker 'self';usb 'none';
referrer-policy: strict-origin-when-cross-origin
strict-transport-security: max-age=31536000; includeSubDomains
x-content-type-options: nosniff
x-dns-prefetch-control: off
x-download-options: noopen
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
Connection: keep-alive
Date: Fri, 12 Feb 2021 20:06:02 GMT
Server: envoy
Content-Length: 14
Content-Type: text/plain
}
Content: Jwt is missing
Request:
Method: GET, RequestUri: 'https://engage.ringcentral.com/voice/api/v1/admin/accounts', Version: 1.1, Content: <null>, Headers:
{
X-User-Agent: EngageVoice.Net/0.1.0
Authorization: Bearer
}
It looks like your exchange for the Engage Token is not working which is probably because you don’t have a valid RC Office Token. Are you using a Developer Sandbox Client credential? If so, you’ll need to move to production for that SDK to work.
How do you exchange the Office Token to Engage Token?
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.