Skip to content

Twitter API returned a 401 (Unauthorized), This request is not properly authenticated #407

Closed
@johendry

Description

@johendry

My code:
from twython import Twython

APP_KEY = 'my app_key'
APP_SECRET ='my app_secret_key'

OAUTH_TOKEN = auth['oauth_token']
OAUTH_TOKEN_SECRET = auth['oauth_token_secret']

twitter = Twython(APP_KEY, APP_SECRET)
auth = twitter.get_authentication_tokens(callback_url='http://www.mysite.com/callback')
twitter = Twython(OAUTH_TOKEN)

twitter.request('https://ads-api.twitter.com/0/accounts/myaccountid/campaigns')

and got error like this
Twitter API returned a 401 (Unauthorized), This request is not properly authenticated

what should i do?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions