Twitter-API-v2-sample-code icon indicating copy to clipboard operation
Twitter-API-v2-sample-code copied to clipboard

Fix 401 unauthorized error

Open nanishin opened this issue 3 years ago • 6 comments

Fix 401 unauthorized error by missed write permission

$ python3 delete_tweet.py Traceback (most recent call last): File "delete_tweet.py", line 67, in raise Exception( Exception: Request returned an error: 401 { "title": "Unauthorized", "type": "about:blank", "status": 401, "detail": "Unauthorized" }

nanishin avatar Mar 19 '22 18:03 nanishin

CLA Assistant Lite bot All Contributors have signed the CLA. If the commit check is not passing, a maintainer must go the Checks tab of this PR and rerun the GitHub Action.

github-actions[bot] avatar Mar 19 '22 18:03 github-actions[bot]

Hello there,

FYI, It's my second day to use twitter python sample codes. When I checked delete_tweet.py operation, it gave me "401 Unauthorized Error" continuously. I found the difference when compared with create_tweet.py. It comes from missed write permission. So I added parameters like create_tweet.py and it worked like a charm. :D Please check the commit and apply it if there's no other issue.

Regards,

nanishin avatar Mar 19 '22 18:03 nanishin

I have read the CLA Document and I hereby sign the CLA

nanishin avatar Mar 19 '22 18:03 nanishin

recheck

nanishin avatar Mar 19 '22 18:03 nanishin

raise Exception( Exception: Request returned an error: 401 { "title": "Unauthorized", "type": "about:blank", "status": 401, "detail": "Unauthorized" }

jiantaolmc avatar Apr 29 '23 16:04 jiantaolmc