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

Requests fails

Open gg4u opened this issue 4 years ago • 3 comments

Hi, there is an issue with requests I could not fix. Could you help? Using python 3 in Google Colab.

see: https://github.com/twitterdev/Twitter-API-v2-sample-code/blob/main/Recent-Search/recent_search.py

import os
import requests
import requests_oauthlib

[...]

connect_to_endpoint(search_url, query_params)

Screen Shot 2021-12-12 at 12 14 50 PM

gg4u avatar Dec 12 '21 11:12 gg4u

Python example fails all the time i do not know why. Exception: Request returned an error: 403 {"title":"Forbidden","detail":"Forbidden","type":"about:blank","status":403}

kelvindoe22 avatar Dec 19 '21 14:12 kelvindoe22

Python example fails all the time i do not know why. Exception: Request returned an error: 403 {"title":"Forbidden","detail":"Forbidden","type":"about:blank","status":403}

For this specific request, can you check the search_url? You might be accessing a url that doesn't work, or that you're not logged in

dandani-cs avatar Jun 02 '22 03:06 dandani-cs