@Dino-at-Google @Miguel Mendoza
We have SAML placed in our organization, In order to get access token for management api calls we need get the passcode from Apigee. Then we get the access token in exchange.
But to automate this process, i want to bypass the passcode thing.
After reading Apigee docs, i came accross two approaches:
curl -H “Content-Type: application/x-www-form-urlencoded;charset=utf-8” \
-H "accept: application/json;charset=utf-8" \
-H "Authorization: Basic ZWRnZWNsaTplZGdlY2xpc2VjcmV0" -X POST \
[https://zoneName.login.apigee.com/oauth/token](https://zoneName.login.apigee.com/oauth/token) -s \
-d 'grant_type=password&username=machineusername&password=machineuserpassword'
Reference - [https://docs.apigee.com/api-platform/system-administration/automating-tasks#:~:text=from%20a%20browser.-,About%20machine%20users,having%20to%20specify%20a%20passcode](https://docs.apigee.com/api-platform/system-administration/automating-tasks#:~:text=from%20a%20browser.-,About%20machine%20users,having%20to%20specify%20a%20passcode).
But this is throwing me error -
{
"error": "unauthorized",
"error_description": "Unable to find identity provider for origin:usergrid"
}
- acurl call ( Acurl to me is totally new thing, also I’m a windows user)
USER=me@example.comPASS=not-that-secretTOKEN=$(get_token -u $USER:$PASS -m ''--force-basic-auth)curl -H "Authorization: Bearer $TOKEN"'https://api.enterprise.apigee.com/v1/organizations/...'
In order to try it out can anyone help me to convert this into normal CURL. so i can try this out.
Kindly assist with any approach where i can generate access tokens automatically( Without human interactions)