Standard OAuth Authorization Code grant.
Standard OAuth Authorization Code grant. Use this option when your app needs the access token server-side. The token never leaves your backend except for the one-shot handoff URL.
All callable requests below use the the base URL Postman variable so the same collection works against dev, staging, and production environments. Set the base URL to your target environment's …/api/v1 URL in your Postman environment.
What you need before you start
| Item | How to get it |
|---|---|
client_id | Create OAuth credentials on the App Credentials page. |
client_secret | Returned once when the client is created. Store securely. |
redirect_uri | A URL on your app, e.g. https://yourapp.com/callback. Register it when creating credentials — it must match exactly (including http/https and trailing slash). |
Flow
- Send the user to Review Management — top-level browser redirect to
the base URL/./oauth/authorizewith the params shown in the sub-request below.stateis a random string you generate and persist in session (CSRF protection). - Receive the code — Review Management bounces the user back to your registered
redirect_uriwith?code=…&state=…. Verifystatematches what you stored. - Exchange the code for a token — call the "Step 3" sub-request.
- Use the token — either call RM APIs with
Authorization: Bearer <access_token>, or hand off to the frontend at<frontend_url>/rs-sso-login/?token=<access_token>. The frontend picks up the token and starts the user's session.
Token revocation
See the "Revoke token" sub-request.
Token expiry & refresh
The endpoint returns the token-response expires_in in seconds (default ~1 year). Use the refresh_token against POST /oauth/token with grant_type=refresh_token to get a new access token before expiry.
A note on the base URL/./oauth/.
the base URL/./oauth/.Passport's OAuth endpoints sit at the host root (not under /api/v1). The . in the path is a relative segment that Postman normalizes before sending — <host>/api/v1/./oauth/token becomes <host>/oauth/token. This keeps the collection environment-portable.
Pre-go-live checklist
- You have
client_idandclient_secret. - Your
redirect_uriis registered and exactly matches what you send. - You verify
stateon the OAuth callback (CSRF protection). - You store the access token server-side. The only legitimate URL use is the one-shot handoff to
rs-sso-login. - You never log or expose
client_secret.
Prerequisites
- A bearer token in the
Authorizationheader. Any endpoint that needs no token says so on its own page. - The id of each record the call targets. Every endpoint page lists the ids it needs.
Errors
| Status | Meaning |
|---|---|
401 | The bearer token is missing, expired or invalid |
403 | The token is valid but the record sits outside your account |
422 | The request failed validation — the response names the fields |
500 | Unexpected server error |
Individual endpoints may return more; each page lists its own.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
GET | Step 1 — Authorize (browser redirect, documentation) | Browser-initiated top-level redirect — NOT a fetch/XHR call from your app. |
GET | Step 2 — Receive code on your callback (browser leg, no Postman action) | This step happens entirely in the user's browser. |
POST | Step 3 — Exchange code for token | Server-to-server call from your backend. |
GET | Revoke token | Revoke the Passport access token presented in the request's Authorization: Bearer header (SSO sign-out). |
