required-oauth2-authorization-url
Overview
This rule belongs to the insomnia-validation ruleset and states that:
If the request authentication type is oauth2 and grantType 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 authorizationUrl property. If the URL is not provided, a dummy value will be assigned automatically during import/transformations in APIMatic.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Required authorizationUrl property in request authentication is missing. |
| Code | INSOMNIA_V400 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Request Authentication |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | insomnia semantic validation url authorization oauth2 type authentication request |
Suggested Fixes
- In the Insomnia application, select the OAuth 2 section from your request, then ensure that the
AUTHORIZATION URLproperty is set to a valid absolute URL. Save and export your Insomnia file again. - Choose a different
GRANT TYPEfrom the dropdown in the OAuth 2 section if the current URL is not applicable for your API authentication. - Add missing
authorizationUrlproperty in the requestauthenticationobject of your Insomnia Export format file. - Make sure that the
authorizationUrlproperty in the requestauthenticationobject of your Insomnia Export format file is not empty and is a valid absolute URL. - Choose a different
grantType(e.g.password,client_credentials) in the authentication object of the Insomnia Export file request if the current URL is not applicable for your API authentication.