# Copy this code and save it to a file called get-token.py
# Install dependencies with command: pip install requests pyperclip
# Run the script with command: python get-token.py
import requests
import pyperclip
# Fill in your credentials below
CLIENT_ID = "REPLACE-ME-WITH-CLIENT-ID"
CLIENT_SECRET = "REPLACE-ME-WITH-CLIENT-SECRET"
SCOPE = "REPLACE-ME-WITH-SCOPE"
# Get access token
response = requests.post("https://id.talenom.com/api/b2b/oauth2/v1.0/token",
data="grant_type=client_credentials&client_id=" + CLIENT_ID + "&client_secret=" + CLIENT_SECRET + "&scope=" + SCOPE,
headers={"Content-Type": "application/x-www-form-urlencoded"})
access_token = response.json()["access_token"]
# Copy to clipboard
pyperclip.copy(access_token)
print("Access token:", access_token)
print("Access token also copied to your clipboard!")