question

Alina Zabolotnaia avatar image
Alina Zabolotnaia asked Suyash Joshi commented

JWT Not working for Production at all (for sandbox the same)

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

authentication
production-jwt.png (45.5 KiB)
1653558210039.png (64.3 KiB)
1 |3000

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

Suyash Joshi avatar image
Suyash Joshi answered Suyash Joshi commented

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.

4 comments
1 |3000

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

Alina Zabolotnaia avatar image Alina Zabolotnaia commented ·

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

1653646877711.png

0 Likes 0 ·
1653646877711.png (72.6 KiB)
Suyash Joshi avatar image Suyash Joshi ♦ Alina Zabolotnaia commented ·

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.

1 Like 1 ·
Alina Zabolotnaia avatar image Alina Zabolotnaia Suyash Joshi ♦ commented ·

@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


0 Likes 0 ·
1653906922700.png (66.6 KiB)
1653906949558.png (25.9 KiB)
Show more comments
Byrne Reese avatar image
Byrne Reese answered

@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 |3000

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

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