Question

Engage Voice API not working Node.js

  • 22 December 2020
  • 2 replies
  • 661 views

Hello guys, so I'm trying to use the engage voice API as this documentation https://developers.ringcentral.com/engage/voice/guide/authentication/auth-ringcentral, at the moment I get the Bearer Access Token for engage voice API as this documentation https://engage.ringcentral.com/api/auth/login/rc/accesstoken, with no problems, but when I'm trying to use it on any engage URL like a simple request

    const getTest = await axios.get(
      `https://engage.ringcentral.com/voice/api/v1/admin/users`,
      {
        headers: {
          Authorization: `Bearer ${engageToken.data.accessToken}`,
          // Accept: 'application/json',
        },
      },
    );

I'm always getting an error "

HTTP Status 401 – Unauthorized

"

I'm following the documentation to the letter but the error is all the time on any request to the engage API.

So please I need some help about this.

Thanks !


2 replies

This sounds like a permission issue. Is the user you are logging in with an admin user with read permissions?

Is the admin user and the app has this 2 permissions Read Accounts, Read Presence

Reply