required-oauth2-access-token-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 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 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 accessTokenUrl property in request authentication is missing. |
| Code | INSOMNIA_V401 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Request Authentication |
| Products Impacted | API Transformer, Code Generation, Developer Experience Portal |
| Tags | insomnia semantic validation url access token oauth2 type authentication request |
Suggested Fixes
- In the Insomnia application, select the OAuth 2 section from your request, then ensure that the
ACCESS TOKEN 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
accessTokenUrlproperty in the requestauthenticationobject of your Insomnia Export format file. - Make sure that the
accessTokenUrlproperty in the requestauthenticationobject of your Insomnia Export format file is not empty and is a valid absolute URL. - Choose a different
grantTypein the authentication object of the Insomnia Export file request if the current URL is not applicable for your API authentication.