required-oauth2-access-token-url
Overview
This rule belongs to the postman-validation ruleset and states that:
If the authentication type is oauth2 and grant_type is set as client_credentials, password or authorization_code, then the authentication object must specify a non-empty access token URL to be used for this grant type, using the accessTokenUrl property. If the access token URL information is missing, a dummy value will be assigned to it automatically during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required accessTokenUrl property in authentication configuration is missing. |
| Code | POSTMAN_V501 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Authentication |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | postman api semantic validation url access token oauth2 type authentication |
Suggested Fixes
- Add missing
accessTokenUrlproperty in theoauth2authentication definition. - Make sure that the
accessTokenUrlproperty in theoauth2authentication object is not empty and is a valid absolute URL. - Choose a different
grant_typein theoauth2authentication object if the current URL is not applicable for your API authentication. - In the Postman application, open the target request/folder/collection level authentication configuration settings by navigating to the relevant Auth section. Next, select OAuth 2.0 from the
Typedropdown, then ensure that theAccess Token URLproperty is set to a valid absolute URL. Save and export your Postman Collection file again. - Choose a different grant type from the
Grant Typedropdown in the Auth section if the current access token URL is not applicable for your API authentication.
For More Information
- https://learning.postman.com/docs/sending-requests/authorization/authorization/
- https://learning.postman.com/docs/sending-requests/authorization/oauth-20/
- https://schema.postman.com/collection/json/v2.1.0/draft-07/docs/index.html
- https://schema.postman.com/collection/json/v2.1.0/draft-07/collection.json
- https://schema.postman.com/collection/json/v2.0.0/draft-07/docs/index.html
- https://schema.postman.com/collection/json/v2.0.0/draft-07/collection.json
- https://schema.postman.com/collection/json/v1.0.0/draft-07/docs/index.html
- https://schema.postman.com/collection/json/v1.0.0/draft-07/collection.json
- https://learning.postman.com/docs/introduction/overview/
- https://docs.apimatic.io/rulesets/overview/