Hello,
I am trying to retrieve the JSON Web Key Set from the Okta’s OpenID Connect & OAuth 2.0 API service. When I query the API over curl, it works. However, if I query the same API using python’s request library, I always get a 405 error with the following error message:
{“errorCode”:“E0000022”,“errorSummary”:“The endpoint does not support the provided HTTP method”,“errorLink”:“E0000022”,“errorId”:“oaeioMrcqfTRPmvFO0rWdRQcQ”,“errorCauses”:}
Here’s my python code (I am intentionally obfuscating my ids):
import requests
url = “https://dev-XXX.okta.com/oauth2/default/v1/keys&client_id=XXX”
resp = requests.get(url)
Here’s my curl request:
curl https://dev-XXX.okta.com/oauth2/default/v1/keys&client_id=XXX
PS. If i copy and paste the same url into my browser, I get the same 405 error I get in python.
Please help!