Skip to main content

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.

PropertyValue
EnabledYes
Maximum SeverityError
MessageRequired authorizationUrl property in request authentication is missing.
CodeINSOMNIA_V400
TypeValidation
Rule SystemSemantic
Broad CategoryRequest Authentication
Products ImpactedAPI Transformer, Code Generation, Developer Experience Portal
Tagsinsomnia 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 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 authorizationUrl property in the request authentication object of your Insomnia Export format file.
  • Make sure that the authorizationUrl 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 (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.

For More Information