
AviS.97166 (Customer) asked a question.
Can we connect to okta APIS by using Python??
I am getting error when trying to connect to Get Users API with the below code:
import requests
import json
api_token = ‘XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX’
headers = {‘Content-Type’: ‘application/json’,‘Accept’:‘application/json’,
‘Authorization’:‘SSWS {api_token)’}
result = requests.get(‘https://{domain}.oktapreview.com/api/v1/users’)
Please help me with the code if you know how to connect to Okta APIS by using Python???

Hi Alexander Ling
I was able to trace the issue and solve it. The code was absolutely fine but as I was running it from Online Compiler it gave a connection error as I called the API from Frontend. When called after installing python on local machine works absolutely fine,