- Import both collection and environment in Postman
- Select environment and edit variables (
CURRENT VALUE
column)baseUrl
- The base url for all apis- See documentation page
- Example:
https://[irix-app-domain]/reseller/api
tokenUrl
- The url for request OAuth Tokens- See documentation page on the
oAuth2Connection
details under theToken URL
- See documentation page on the
clientId
- Connection details should be received from the application administrator
clientSecret
- Connection details should be received from the application administrator
scopes
- Scopes list that are requested during the authentication step (space separated)
Documentation about OAuth 2.0 Client Credentials Flow:
- https://www.oauth.com/oauth2-servers/access-tokens/client-credentials/
- https://auth0.com/docs/get-started/authentication-and-authorization-flow/client-credentials-flow
This is a sample for testing that the received client credentials are working
- Use Request:
Authentication
\GetToken with ClientCredentials
- Make sure to configure
- Basic Authentication (under
Authorisation
tab) - Body params:
grant_type
(should beclient_credentials
)scopes
- is preconfigured to use environment variable {{scopes}}
- Basic Authentication (under
Note: Postman includes internal utility for requesting Access Tokens with OAuth 2.0 Client Credentials. This is just for manual testing or for extracting a
Code Sample
- Select
Authorization
tab on the main collection and make sure Postman can request tokens that can be used - Make sure the request inherits the parent
Auth
method or select directly the OAuth 2.0 with Client Credentials - After generating the Token tha Apis should send proper token in the
Authorisation:
header