python - 403 Error with tweepy -


i trying use tweepy operate twitter account using python appear have slipped @ the first hurdle. no matter try, keep getting 403 error no specific details.

import tweepy    # consumer keys , access tokens, used oauth  consumer_key = 'xxxxxxxxxxx'  consumer_secret = 'xxxxxxxxxxx'  access_token = 'xxxxxxxxxxxx'  access_token_secret = 'xxxxxxxxxxx'        # oauth process, using keys , tokens  auth = tweepy.oauthhandler(consumer_key, consumer_secret)  auth.set_access_token(access_token, access_token_secret)     # creation of actual interface, using authentication  api = tweepy.api(auth)     # sample method, used update status  api.update_status('hello')
(keys blanked out, assure twitter provides)

this basic code provided tutorial, returns

traceback (most recent call last):    file "c:\users\sam\documents\python\tweepy\tweepy.py", line 22, in <module>      api.update_status('hello')    file "c:\python34\lib\site-packages\python_twitter-2.1-py3.4.egg\tweepy\binder.py", line 153, in _call      raise tweeperror(error_msg)  tweepy.error.tweeperror: twitter error response: status code = 403

does have ideas? can't see why forbidden request. keys not false far can tell.

thanks

this discussion bit old, might apply anyway.

they tweepy uses http default , twitter requires api connections go through tls/ssl , suggest using auth = tweepy.auth.oauthhandler(consumer_key, consumer_secret, secure=true)

also, 1 of comments mentions having problems because clock set 10 minutes ahead of time.


Comments

Popular posts from this blog

java - Custom OutputStreamAppender not run: LOGBACK: No context given for <MYAPPENDER> -

java - UML - How would you draw a try catch in a sequence diagram? -

c++ - No viable overloaded operator for references a map -