Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired accessTokenUrl property in request authentication is missing.
CodeINSOMNIA_V401
TypeValidation
Rule SystemSemantic
Broad CategoryRequest Authentication
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsinsomnia 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 URL property is set to a valid absolute URL. Save and export your Insomnia file again.
  • Choose a different GRANT TYPE from the dropdown in the OAuth 2 section if the current URL is not applicable for your API authentication.
  • Add missing accessTokenUrl property in the request authentication object of your Insomnia Export format file.
  • Make sure that the accessTokenUrl property in the request authentication object of your Insomnia Export format file is not empty and is a valid absolute URL.
  • Choose a different grantType in the authentication object of the Insomnia Export file request if the current URL is not applicable for your API authentication.

For More Information