Question

Problems switching from password flow to JWT flow

  • 20 January 2024
  • 1 reply
  • 125 views

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 reply

Userlevel 1

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.

Reply