required-oauth2-authorization-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 implicit
or authorization_code
, then the authentication object must specify a non-empty authorization URL to be used for this grant type, using the authUrl
property. If the authorization 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 authUrl property in authentication configuration is missing. |
Code | POSTMAN_V500 |
Type | Validation |
Rule System | Semantic |
Broad Category | Authentication |
Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
Tags | postman api semantic validation url authorization oauth2 type authentication |
Suggested Fixes
- Add missing
authUrl
property in theoauth2
authentication definition. - Make sure that the
authUrl
property in theoauth2
authentication object is not empty and is a valid absolute URL. - Choose a different
grant_type
(e.g.password
,client_credentials
) in theoauth2
authentication 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
Type
dropdown, then ensure that theAuth URL
property is set to a valid absolute URL. Save and export your Postman Collection file again. - Choose a different grant type from the
Grant Type
dropdown in the Auth section if the current authorization 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/