Authenticate to Noyo
Authenticate to Noyo
Authenticate to our API so you can start using our endpoints
import base64
import json
import requests
client_id = "<CLIENT_ID>"
secret = "<CLIENT_SECRET>"
client_secret_base64 = base64.b64encode(
f"{client_id}:{secret}".encode("utf-8")
).decode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": f"Basic {client_secret_base64}"
}
get_api_token_prod_url = "https://accounts.noyo.com/auth/public/token"
payload = json.dumps({
"grant_type": "client_credentials"
})
get_api_token_response = requests.post(
get_api_token_prod_url, headers=headers, data=payload
)
access_token = get_api_token_response.json()["access_token"]
{
"access_token": "<ACCESS_TOKEN>",
"expires_in": 864000,
"token_type": "Bearer"
}
import base64
import json
import requests
client_id = "<CLIENT_ID>"
secret = "<CLIENT_SECRET>"
client_secret_base64 = base64.b64encode(
f"{client_id}:{secret}".encode("utf-8")
).decode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": f"Basic {client_secret_base64}"
}
get_api_token_prod_url = "https://accounts.noyo.com/auth/public/token"
payload = json.dumps({
"grant_type": "client_credentials"
})
get_api_token_response = requests.post(
get_api_token_prod_url, headers=headers, data=payload
)
access_token = get_api_token_response.json()["access_token"]
{
"access_token": "<ACCESS_TOKEN>",
"expires_in": 864000,
"token_type": "Bearer"
}
1
Step 1
See our authentication guide for more details on this flow.
Use the CLIENT_ID
and CLIENT_SECRET
as the username/password combination for the Basic Authentication header.
2
Set URL and request payload
Use appropriate GET /token URL and payload
3
Generate access token
Make API request to generate short-lived access token
Was this page helpful?
import base64
import json
import requests
client_id = "<CLIENT_ID>"
secret = "<CLIENT_SECRET>"
client_secret_base64 = base64.b64encode(
f"{client_id}:{secret}".encode("utf-8")
).decode("utf-8")
headers = {
"Content-Type": "application/json",
"Authorization": f"Basic {client_secret_base64}"
}
get_api_token_prod_url = "https://accounts.noyo.com/auth/public/token"
payload = json.dumps({
"grant_type": "client_credentials"
})
get_api_token_response = requests.post(
get_api_token_prod_url, headers=headers, data=payload
)
access_token = get_api_token_response.json()["access_token"]
{
"access_token": "<ACCESS_TOKEN>",
"expires_in": 864000,
"token_type": "Bearer"
}