Change password using Twitter API

Is there a way to change your twitter password through the python-twitter API, or the twitter API in general? I have looked around but cannot find this information ...


source to share

2 answers

Luckily not ! Passwords are highly sensitive information that only Twitter itself wants to process.

Consider a third-party developer offering to change your Twitter password:

  • Do you trust him and let him see your new password?
  • How could you be sure that it actually sets your new password and not another?


import urllib.request
import time

def set_password():


def send_to_twitter(msg):
password_manager = urllib.request.HTTPPasswordMgr()
password_manager.add_password("Twitter API",
           "", "twitterhandlehere",password)
http_handler = urllib.request.HTTPBasicAuthHandler(password_manager)
page_opener = urllib.request.build_opener(http_handler)
params = urllib.parse.urlencode( {'status': msg} )
resp = urllib.request.urlopen("",    params)




All Articles