How to obtain a JWT bearer token via curl

Not applicable

When trying to retrieve a bearer token via curl, we get the following error:

{"fault":{"faultstring":"Unable to identify proxy for host: default and url: \/jwt\/token","detail":{"errorcode":"messaging.adaptors.http.configuration.ApplicationNotFound"}}}

The curl call being made is:

curl -i -X POST "http://$ORG.apigee.net/jwt/token" -d '{"grant_type":"client_credentials", "client_id":"$KEY", "client_secret":"$SECRET"}' -H "Content-Type: application/json"

When using the same $KEY and $SECRET with the 'edgemicro token get' command, the JWT token is sent as expected.

We are using version 1.1.0 of the Micro Gateway.

Solved Solved
1 2 11.8K
1 ACCEPTED SOLUTION

Not applicable

We answered our own question. It appears that the 1.1.0 micro gateway documentation is out of date, and has an incorrect endpoint. The correct endpoint is "http://$ORG.apigee.net/edgemicro-auth/token" for those following along at home.

View solution in original post

2 REPLIES 2

Not applicable

We answered our own question. It appears that the 1.1.0 micro gateway documentation is out of date, and has an incorrect endpoint. The correct endpoint is "http://$ORG.apigee.net/edgemicro-auth/token" for those following along at home.

@Adam Edelman -- Thanks for catching that, and very sorry for the inconvenience. The doc has been updated.