Need to download call recordings from Engage Voice but getting an error at the highlighted line.
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
}