we are using oauth2 token to allow API access.. this also requires to create proxy endpoint to allow users to update their consumer secret. How can we do that?
Can I access management API to update consumer secret via proxy?
the api user is expected to update their consumer key every 90 days. how can we provide them the API to update their consumer secret to the values they want. (not autogenerated)
Solved! Go to Solution.
In Apigee Edge, it is not possible to modify the consumer id or consumer secret.
It is possible to create a consumer {id,secret} pair.
It is possible to delete the pair. It is not possible to modify the values.
the api user is expected to update their consumer key every 90 days. how can we provide them the API to update their consumer secret to the values they want. (not autogenerated)
That's not how consumer secrets work in Apigee Edge.
IT IS possible to import a consumer {key,secret} pair, using the Management API. This is not modification of an existing { key,secret } pair, but is importation of a new pair.
You can do it like this:
curl -i -H Content-type:application/json \ https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d '{ "consumerKey": "NEW_CONSUMER_KEY", "consumerSecret": "NEW_CONSUMER_SECRET" }'
After that you will probably want to associate that pair with an API Product. Do that like this:
curl -i -H Content-type:application/json https://api.enterprise.apigee.com/v1/o/{org-name}/developers/{developer_email_or_id}/apps/{app_name}... -X POST -d '{ "apiProducts": ["P1", "P2"]}'