Forum Discussion

API_User's avatar
API_User
Equinix Employee
2 years ago

Fabric API generate token using client_credentials

I am trying to generate token using this method but in Postman: Access Token using grant_type = client_credentials (Recommended). POST 'https://api.equinix.com/oauth2/v1/token' -H "content-type:...
  • API_User's avatar
    2 years ago

    Got it, used wrong credentials

     

    access_token=`curl -s --request POST \ 
    --url https://${endpoint_url}/oauth2/v1/token \
    --header 'accept: application/json' \
    --header 'content-type: application/json' \
    --data '{"client_id":"'${client_id}'","client_secret":"'${client_secret}'","grant_type":"client_credentials"}' \
    | jq -r '.access_token'`