question

Alina Zabolotnaia avatar image
Alina Zabolotnaia asked Suyash Joshi commented

Authentication issue via Postman

I have an issue with authorization. I created app for pass-based auth (now it's applied only for sandbox) and tried to get authentication token. I downloaded collection from postman with available requests.


I get error like that for password based auth flow (sandbox):
1654689854443.pngI filled out all the environment fields which are required:
1654690056671.png



Before I tried to use jwt auth, but found that we can't use jwt flow for sandbox.
I tried to use jwt for production (created jwt credentials for production) and got error that I need client_id, but I don't find in documentation that I need client_id for jwt.
1654690314516.png
Can you help me please? How can I authenticate?

authentication
1654689854443.png (47.1 KiB)
1654690056671.png (33.0 KiB)
1654690314516.png (62.3 KiB)
2 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.

Suyash Joshi avatar image Suyash Joshi ♦ commented ·

Hi @Alina Zabolotnaia make sure the "Pre-request Script" also names the variable as "RINGCENTRAL_CLIENT_ID". Can you attach a screenshot of showing what's in that script?

0 Likes 0 ·
Alina Zabolotnaia avatar image Alina Zabolotnaia Suyash Joshi ♦ commented ·

Password based:
1654761665030.pngJWT:

1654761700356.png

0 Likes 0 ·
1654761665030.png (71.3 KiB)
1654761700356.png (73.2 KiB)

1 Answer

Suyash Joshi avatar image
Suyash Joshi answered Suyash Joshi commented

Hi @Alina Zabolotnaia In order to make sure there are no errors in how your postman collection & environment is setup, can you try to use my Postman collection that I've tested and it works with both 'Password Flow' and 'JWT' authentication flows?

Steps:

1. Open your postman tool

2. Click "Import" --> "Link" -> https://www.getpostman.com/collections/0b6b34907a01c90293a4

3. After importing, Open the Collection "Auth" folder and "Fetch access_token" is for password flow based authentication and the other one is using JWT. Make sure, "URL", "Header", "Body", "Pre-req" matches yours if you want to check against yours otherwise, make sure the environment has the variables that are needed (see screenshot of my environment -for Password flow). Especially note that the RingCentral Client ID and Secret are named "RC_APP_ID" & "RC_APP_KEY".

4. Paste the values for the following environment variables RC_SERVER_HOSTNAME, RC_APP_ID, RC_APP_KEY, RC_USERNAME, RC_PASSWORD for both Initial and Current value columns.

4. Execute the request by pressing "Send"

5. In the "Response" section of Postman, you should see value for "access_token" that you can use to make subsequent calls, in this collection against Analytics APIs.


screen-shot-2022-06-09-at-10814-pm.pngLet me know how that goes, I can also make a screencast video showing these steps for you if needed.


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 ·

Thank you for answer, but with you collection I have the same result.
May we can make a short call on Tuesday for example? If it's possible in first part of day, cause we have big time difference.
1654856381542.png

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

sure, I've sent you a meeting invite for Tuesday morning to help resolve this issue.

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

Please, let me know when we can make a call) I haven't email invite.

0 Likes 0 ·
Show more comments

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