Skip to main content

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?

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?


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.


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


Reply