News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
JWT Not Working in Production
Tags: authentication
Mar 1, 2022 at 7:30am   •   3 replies  •  0 likes
Help Center

Hi,

I am using the RC Javascript library (v4.7.0). Our app graduated from sandbox to production. To accommodate this change, we updated our server, client id, client secret, and JWT values to the production values. However, we cannot even authenticate. We get the following error:


LOG: Error caught in ringcentral.auth(), Error: Resource not found: at Client.<anonymous> (C:\D3\src\node_modules\@ringcentral\sdk\lib\http\Client.js:115:35)


Our app was set up to use JWT auth flow and the sandbox values still work. Just not the production ones. Our code is simple:


let rcsdk = new RingCentral({

server: keys.Secrets.ringcentral_server,

clientId: keys.Secrets.ringcentral_client_id,

clientSecret: keys.Secrets.ringcentral_client_secret

});


let platform = rcsdk.platform();


await platform.login({

jwt: keys.Secrets.ringcentral_jwt,

});


Like I said, if I change the ringcentral variable values above back to sandbox, we can authenticate.


To show that we are indeed in production, here is a screenshot of the credentials page for our app:


1646148632551.png


Has anyone else had this problem?

on Mar 1, 2022 at 9:04am   •  0 likes

Give me your app client id.

on Mar 1, 2022 at 9:17am   •  0 likes

It is g_qij6n3RAqIijYDyLWN5w

on Mar 1, 2022 at 9:44am   •  0 likes

Thanks! I look into your dev account and could not see the option to create a JWT token. Which user did you login the dev portal to create the JWT token for your app on production?

on Mar 1, 2022 at 9:47am   •  0 likes

help@popsells.com

1646156743325.png


I created JWT tokens for the sandbox and production on 2/15.

1646156810843.png

I tried creating another production token today but that one also does not work.

2 Answers
answered on Mar 1, 2022 at 12:21pm  

Ok. You seem to be doing everything right. Your JWT credential is configured for use with all apps in your org Your JWT credential is set to production

And I assume: Your app is configured to call platform.ringcentral.com (not platform.devtest.ringcentral.com) You are presenting the client ID and secret of an app configured for JWT

I took the liberty of logging into your account, and using your client/secret, and the JWT token you generated above, and everything worked.

There is a remote possibility that our server cache needed to be updated in order for the JWT to be recognized. Try again now that a few minutes have passed and let me know if it works.


 0
on Mar 2, 2022 at 3:24pm   •  0 likes

It worked!!!

Thank you very much for your help Byrne!

answered on Mar 1, 2022 at 9:51am  

@Help Center I checked your account to see if there was a problem, but saw none. To create a JWT follow this instructions:

  • Login to Developer Console

  • In the upper righthand corner, click your profile name

  • Select "Credentials" from the menu

  • Click "Create JWT" and you should be good to go.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us