post https://api.raptormaps.com/oauth/token
Use this endpoint to retrieve an API access token with your API Credentials.
import requests
import os
import json
# Get client ID
client_id = 'your_client_id_here'
client_secret = 'your_client_secret_here'
token_endpoint = 'https://api.raptormaps.com/oauth/token'
token_endpoint_headers = {
'content-type': 'application/json'
}
token_endpoint_body = {
'client_id': client_id,
'client_secret': client_secret,
'audience': 'api://customer-api'
}
token_response = requests.post(
token_endpoint,
headers=token_endpoint_headers,
data=json.dumps(token_endpoint_body))
response_data = token_response.json()
api_access_token = response_data.get('access_token')
print(f'api access token: {api_access_token}')