mannynotfound / delete-trump

Automatically tell Trump to delete his account.
102 stars 17 forks source link

401 Error #3

Open PythonKaBadshah opened 8 years ago

PythonKaBadshah commented 8 years ago

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 commented 8 years ago

@mannynotfound Please Man reply

befreestudios commented 8 years ago

@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 commented 8 years ago

@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 commented 8 years ago

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

PythonKaBadshah commented 8 years ago

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 commented 8 years ago

@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"
  }
}