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

401 Error #3

Open
PythonKaBadshah opened this issue Jun 18, 2016 · 6 comments
Open

401 Error #3

PythonKaBadshah opened this issue Jun 18, 2016 · 6 comments

Comments

@PythonKaBadshah
Copy link

Hello,
I just tried using the Script, i am in UTC TimeZone same as of Twitter, i ran the script using npm start or either like node app.js from my Local Machine.

STARTING DYA STREAM ....
[Error: Status Code: 401]

and it exits off. Than i went to runnable.com server's and tried the same Thing and again same status code there. I created another basic nodejs with same access key, token , client and there it works. So maybe something is wrong within your script or maybe some mistake i am making. Please enlighten me how to solve

@PythonKaBadshah
Copy link
Author

@mannynotfound Please Man reply

@befreestudios
Copy link

befreestudios commented Jun 22, 2016

@PythonKaBadshah double check your credentials, seems like something is wrong with your config...

401 Unauthorized    Authentication credentials were missing or incorrect.
Also returned in other circumstances, for example all calls to API v1 endpoints now return 401 (use API v1.1 instead).

@PythonKaBadshah
Copy link
Author

@befreestudios The credentials and the Tokens are absolutely correct, i had used and am using the same tokens on my other Python OAuth script

@PythonKaBadshah
Copy link
Author

@befreestudios Could you Post the format of config.json file?

@PythonKaBadshah
Copy link
Author

This is format of my config.json file

{
"consumer_key": "xxxxxxxxxxxxxxxxx",
"consumer_secret": "xxxxxxxxxxxxxxx",
"access_token": "xxxxxxxxxxxxxxxxx",
"access_token_secret": "xxxxxxxxxxxxxxxxxx"
}

Is that correct? if yes, than its giving me 401 error

@befreestudios
Copy link

@PythonKaBadshah looks like your missing the parent "api" object in the config...

this is what I have and it works...

{
  "api": {
    "consumer_key": "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "consumer_secret": "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "access_token_key": "XXXXXXXXXXXXXXXXXXXXXXXXX",
    "access_token_secret": "XXXXXXXXXXXXXXXXXXXXXXXXX"
  }
}

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