unable to set consumerKey and consumerSecret to developer app

I am trying to run below curl command to create a developer app with defined consumerKey and consumerSecret but it is throwing me 500 error. I need a way to create/update existing consumerKey and consumerSecret with an app, this is required for my migration. We do not want to redistribute the key and secret again. Thank you for looking into my issue.

 

curl --location "https://api.enterprise.apigee.com/v1/organizations/${APIGEE_ORG}/developers/${EMAIL}/apps/${APP}/keys/create" \
--header "Authorization: Bearer $TOKEN" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--data '{
"consumerKey": "xxxxxxxxxxxxxxxxxxx",
"consumerSecret": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}'
 
I did create my token using below command since my login to GCP console is through Okta.

export TOKEN=$(gcloud auth application-default print-access-token)
Solved Solved
1 1 201
1 ACCEPTED SOLUTION

command which is mentioned in description is working for me. Looks like there is some mistake from my end while generating the token

View solution in original post

1 REPLY 1

command which is mentioned in description is working for me. Looks like there is some mistake from my end while generating the token