This page describes how to request a token exchange. These authentication tokens should be used when making api requests for a single user.
Scopes
Scope | Use |
---|---|
api:read | Used to perform read-only operations for machine to machine (M2M) scenrarios. |
api:write | Used to perform full CRUD operations for machine to machine (M2M) scenrarios. |
ui:client-onboarding | Used for the Onboarding Client Component |
api:credit-insights:read | Access to Read Credit Insights data |
api:profile:read | Access to Read Profile data |
api:trade-line:read | Access to Read Credit Line data |
customer:<upwardli_customer_id> | Access to Read and Write data for a specific customer |
Exchanging Tokens Using The API
Once a valid token has been obtained using the Authentication API, a limited scope token can be obtained using the token exchange API. This token can be used to make requests for a specific customer, and is safe to send to the client application/web browser as needed.
To request a token exchange send a POST to our auth server containing the access_token and requested scope.
Token Exchange Request
POST https://auth-sandbox.upwardli.com/auth/token/exchange/
Here’s what a successful response looks like:
Notes:
- The audience must be for the correct Environment.
- The upwardli_customer_id is the Upwardli id that you get from the Customer.created webhook.
- The new access token is a significantly longer string than the original access token.