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 for Production at all (for sandbox the same)
Tags: authentication
May 26, 2022 at 2:43am   •   2 replies  •  0 likes
Alina Zabolotnaia

I got test environment for customer, but I can't access to get data.
I created Jwt for production, but in response I catch Invalid token.
May somebody knows what a reason can be?
production-jwt.png1653558210039.png

2 Answers
answered on May 27, 2022 at 4:04pm  

@Alina Zabolotnaia What token are you using in your Authorization header? Bear in mind that the JWT token is used to retrieve an access token, and this access token is then used in your HTTP Authorization header to successfully authenticate with RingCentral. A common misunderstanding is that the JWT token you retrieve from the Developer Console is used directly in your Authorization header. Do you know if this is what you are doing?


 1
answered on May 26, 2022 at 8:47am  

Hi @Alina Zabolotnaia I'm not seeing a screenshot where you are actually getting the valid token before calling the Call Log API. The problem could be that you haven't been able to correctly set up postman for JWT and get the token, in which case I'd recommend reading through this guide and using the Postman collection provided here for testing JWT auth. Once that works, please confirm and then execute Call Log API.


 0
on May 27, 2022 at 3:23am   •  0 likes

@Suyash Joshi thank you for your answer! I did according this guide and got this error. What can be the problem?

1653646877711.png

on May 27, 2022 at 1:52pm   •  1 likes

I'm not seeing that in your screenshot, it's still showing password flow-based auth. Can you follow these steps and update here, if that still doesn't work we can setup a quick call.

  1. In the upper left corner of the Postman application click the "Import" button.
  2. Click the "Import from Link" tab.
  3. Paste in the following URL where it says "Enter a URL and press import": https://raw.githubusercontent.com/ringcentral/ringcentral-api-docs/master/docs/messaging/sms/specs/ringcentral_sms_rest_apis.postman_collection.json
  4. Click the "Continue" button

Afterward follow the steps here https://developers.ringcentral.com/guide/messaging/sms/postman#configuring-your-postman-environment to configure your environment where you will paste the JWT token inside a variable "RINGCENTRAL_JWT". Then you should be able to call the auth API endpoint and get the access token.

on May 30, 2022 at 3:37am   •  0 likes

@Suyash Joshi yes, I checked that page and template for postman.
No I have a new issue. I use a jwt flow but I have a message like I need also clientId and secret.

Really strange behavior
1653906949558.png


1653906922700.png


on May 31, 2022 at 9:22am   •  1 likes

Hi @Alina Zabolotnaia yes, you need to fill in RINGCENTRAL_JWT but also your Client ID and Secret - check what those variables are for example in my postman environment they are referred to as RC_APP_ID and RC_APP_SECRET. Looks like you might be missing the Client ID or it is typed incorrectly, also make sure the JWT token is good for that client ID.



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