How to get the Apigee Delegated Token Management sample working?

Not applicable

In attempt to get external OAuth working for our setup I figured I'd start by getting the Apigee Delegated Token Management working first and see if I could modify from there...

I cloned https://github.com/dzuluaga/apigee-tutorials/tree/master/apiproxies/musicapi-oauth-delegated-authent..., got grunt working, updated the 'org' field twice in grunt/apigee-config.js and ran grunt --env=test --username=$ae_username --password=$ae_password.

All appeared to run correctly, tests passed, and manual inspection of the Edge interface confirmed that all appeared to be installed. Then I realised that the tests had run against the "testmyapi" account rather than mine, so updated tests/musicapi-oauth-delegated-authentication-test.js to reference my account and now the tests won't pass.

I did speculate that perhaps I needed to grab my own client_id from lyrics.wikia.com but I don't see how that is done!

If the worked example doesn't work then it leaves me with little hope of getting my needs sorted!

Thanks,

Rob

0 2 219
2 REPLIES 2

cc @Diego Zuluaga 🙂

Not applicable

No need to get into making tests work. Just make sure that you replace your Org in these calls:

Step 1:

curl https://testmyapi-test.apigee.net/oauth-delegated/generatetoken\?external_access_token\=123456 \
-d 'client_id=sxnS7SddD6494Akbqk74ej4SmvvqjL0O&grant_type=client_credentials' -v

Step 2:

curl https://testmyapi-test.apigee.net/oauth-delegated/music\?func\=getSong\&artist\=radiohead\&fmt\=json -H 'Authorization:Bearer 123456'