Byron King avatar image
Byron King asked Phong Vu commented

Problems switching from password flow to JWT flow

Our users use the RC Phone app (the soft phone). It is installed on each desktop. We have a .NET app that currently uses the password flow to auth:

await restClient.Authorize(Username, Extension, Password);

The app uses CallOut to make calls:

await restClient.Restapi().Account().Telephony().CallOut().Post(makeCallOutRequest);

This method inits the soft phone to make the call. If the user needs to navigate a phone tree, they can use the numpad on the soft phone. We have to switch to JWT flow before March, so I created a new app and a JWT token to auth using JWT. I switched the client ID and client secret from the password flow app to the JWT flow app and can successfully authenticate:

await restClient.Authorize(rcJwtToken);

The problem is that I am no longer able to make calls, as I keep getting "CMN-102", which indicates a "Resource for parameter [deviceId] is not found". The only things I changed are the client secret, client ID, and line to use the JWT token. The exception is thrown at this line:

await restClient.Restapi().Account().Telephony().CallOut().Post(parameters);

How can I get this working? Thanks!

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

Phong Vu avatar image
Phong Vu answered Phong Vu commented

Using password flow or JWT flow authentication will give the same access token scopes and permissions!

You have to make sure that the JWT token was generated by the user who authenticated the RingCentral softphone, and you can always read that user's device to get a list of device ids that belong to the user.

1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Byron King avatar image Byron King commented ·

I created a JWT for my user account, but whether I am logged in to the soft phone app or the desktop app, when I use the endpiont you sent to get the devices:

The status of the device returned is "offline":

"type": "SoftPhone",

"sku": "DV-1",

"name": "RingCentral Phone app",

"status": "Offline",

If not having logged in, what determines whether a device is "online"? Even on the service site, the device shows "offline". I can make calls using the soft phone, however.


0 Likes 0 ·
1705872562050.png (7.3 KiB)
Phong Vu avatar image Phong Vu ♦♦ Byron King commented ·

It could be that you also logged in the RingCentral SoftPhone with some other users. Otherwise, you should see this screen and be able to deauthorize the app.


If this is the case, login the admin portal with a user credentials that you used to login the app before and check the device and deauthorize the computer for that user.

If that is not the case or you cannot find such options, submit a dev support ticket so someone can help looking into your account.

0 Likes 0 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys