<iframe src="https://www.googletagmanager.com/ns.html?id=GTM-M74D8PB" height="0" width="0" style="display:none;visibility:hidden">
Loading
Skip to NavigationSkip to Main Content
API Call Results in "Method Not Allowed" or 405 Error
Okta Classic Engine
Okta Identity Engine
Administration
Overview

When making a request to the Okta API, one of the following errors is returned (depending on the API client being used):

  • Method Not Allowed
  • The endpoint does not support the provided HTTP method
  • 405
  • E0000022
Applies To
  • Okta API
  • Okta Classic Engine
Cause

Possible causes:

  • The HTTP method being used is not valid for the request (for example, POST or PATCH is being called on an endpoint that only supports GET).
  • The API request query string was not formed correctly or is invalid. For example:

GET {{url}}/api/v1/logs/api/v1/logs?q=logout

NOTE: In this example, the api/v1/logs endpoint is duplicated in the query string to replicate the error. 
  • The URL entered begins with http instead of https.
Solution
  • Ensure that both a valid HTTP Method and a query string are being requested.
  • Ensure the URL entered starts with https, not HTTP.

 

Related References

  • For additional information on how to use the Okta API and response error codes, please see API Reference Guide.
Loading
API Call Results in "Method Not Allowed" or 405 Error