Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with OAuth1Session in http.py #304

Open
antoniosequeiraws opened this issue Aug 2, 2023 · 1 comment
Open

Problem with OAuth1Session in http.py #304

antoniosequeiraws opened this issue Aug 2, 2023 · 1 comment

Comments

@antoniosequeiraws
Copy link

antoniosequeiraws commented Aug 2, 2023

Our pipeline was working fine until last Friday (28/07/2023) when it start giving us issues when we were fetching async stats job data.
After a lot of debugging I was able to pinpoint the issue to row 110 in http.py, which uses OAuth1Session.get method in our specific case. Basically it gives us back an unauthorised error 403 when we were trying to get a gzip file trough this method, which worked fine in the past. More strangely if I paste the URL of the request in any browser, even in incognito, I'm able to download the file without any issues, it's like it doesn't even need any authorisation.
I made a small change in the code just to test if this was a problem of the SDK or if it was a problem with our developer account as you can see in the following image and I was able to make the pipeline work again.
image

As you can see I've used the requests library to replace the OAuth1Session.get method and I was able to surpass the issue. So in conclusion there seems to be a problem with the usage of OAuth1Session.get method for async stats job data.

@nbro10
Copy link

nbro10 commented Aug 7, 2023

@antoniosequeiraws The Twitter Ads API apparently changed and this package is dead (unmaintained), so now there's this and maybe other bugs in it. The async report is now public and you should not make an authenticated request to download it. Just download it normally with a custom function (e.g. with requests and gzip)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants