Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Issue in Auth code grant type Github example

Hi guys, I am trying the Auth code Github example and getting errors, when I pass,

yo oauth-auth-code-grant-sample
Follow the prompts:
Sample Generator of OAuth Authorization Code Grant Type Proxies.
? Your user name:{email}
? Password:{password}
? Management API URL Endpoint:  https://login.apigee.com/login
? Organization Name:{org}
? Environment Name:test
Error: Get API info returned status 401
'-o' is not recognized as an internal or external command,
operable program or batch file.
'.' is not recognized as an internal or external command,
operable program or batch file.
'{org-name}' is not recognized as an internal or external command,
operable program or batch file.
curl: (6) Could not resolve host: application; Host not found
The system cannot find the path specified.
curl: (6) Could not resolve host: application; Host not found
The system cannot find the path specified.
Error: Get API info returned status 401
'-o' is not recognized as an internal or external command,
operable program or batch file.

I am passing correct login info, why am I getting 401?

Solved Solved
0 12 558
1 ACCEPTED SOLUTION

Hi @Barahalikar Siddharth, I just tried this and it worked for me. So I suspect there to be some other problem.

Tip: For the "management api url" question, just hit enter. I will accept the default which is shown in parenthesis and that will work fine.

From the error you have pasted, it looks like apigeetool is not working properly.

1) Could you please update your apigeetool?

$ npm update -g apigeetool

2) Please test apigeetool by fetching all proxy data from your org

$ apigeetool listdeployments -o {orgname} -e {envname} -u {email}

and enter password when prompted.

This should give you revisions of all proxies deployed on your org. This will test that apigeetool works.
If (2) works after you ran the update command in (1), maybe the original problem is fixed. Just try the "yo" command again.



Else let me know what is the error (same or new) and I will look a little more deeper.

View solution in original post

12 REPLIES 12
Top Solution Authors