Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getToken errors #4

Open
Assignment2015 opened this issue Sep 14, 2015 · 4 comments
Open

getToken errors #4

Assignment2015 opened this issue Sep 14, 2015 · 4 comments

Comments

@Assignment2015
Copy link

Hi,
When I am trying to use this api, I encounter some problems about 'getToken'. The error is shown below.

image

Please give me some suggestions, thank you.

@leefsmp
Copy link
Contributor

leefsmp commented Sep 14, 2015

Did you fill up credentials.js with your API keys?

@leefsmp
Copy link
Contributor

leefsmp commented Sep 14, 2015

That page is public, so you may not want to share your API keys publicly here... now you just posted your keys, so everybody will be able to use the service on your behalf. You need to delete your App and create a new one to get new keys. Never share your API keys.

Did you try the curl command described on https://developer.autodesk.com/api/view-and-data-api/ (step2) from the command line?

It looks like your http request fails very early, are you restricted by some firewall?

@Assignment2015
Copy link
Author

Thanks for the reminding.
Yes, I have run the curl command described on https://developer.autodesk.com/api/view-and-data-api/ (step2) from the command line, and get the token.
Should I put the token somewhere in the file?

@leefsmp
Copy link
Contributor

leefsmp commented Sep 14, 2015

Running curl was just to make a test, you should not have to put the token anywhere, this should be retrieved from the http call. You need to sort out why your server is not returning a response when invoking the token API. What is going on when typing "http://localhost:3000/api/token" in the browser? Are you able to debug the server (for example if you use an IDE like WebStorm which allows node debugging) ...?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants