threads-api icon indicating copy to clipboard operation
threads-api copied to clipboard

Get getPostIDfromURL is getting 429 from Vercel

Open 0Xero7 opened this issue 2 years ago • 4 comments

Looks like calling getPostIDfromURL from Vercel is getting 429 responses. GetPostID

However, getThreads is working fine GetThreads

The test thread

Perhaps we need to find the API endpoint for getPostIDfromURL instead of just calling the website? 🤔

0Xero7 avatar Jul 10 '23 18:07 0Xero7

I think this is happening by ip address from threads.net

e-roy avatar Jul 10 '23 23:07 e-roy

For anyone facing this issue, I had to use a proxy provider to "solve" it

0Xero7 avatar Jul 12 '23 17:07 0Xero7

For anyone facing this issue, I had to use a proxy provider to "solve" it

@0Xero7 do you have an example code of what you mean?

I'm using "threads-api": "^1.4.0", and the issue is intermittent for me, mostly not working.

e-roy avatar Jul 13 '23 01:07 e-roy

For anyone facing this issue, I had to use a proxy provider to "solve" it

@0Xero7 do you have an example code of what you mean?

I'm using "threads-api": "^1.4.0", and the issue is intermittent for me, mostly not working.

Hey, sorry for the late response. Looks like this particular issue has been fixed.

If you are being 429'd on other methods, I basically used a proxy (I used ZenRows) to send the requests. You can take a look at their documentation for details.

Here is a code snippet -

response = await axios({
            url: 'https://api.zenrows.com/v1/',
            method: 'POST',
            headers: {
                'accept': '*/*',
                'content-type': 'application/x-www-form-urlencoded',
                'x-asbd-id': '129477',
                'x-fb-lsd': 'kugg2VLa1Ctd3eh0XkX39T',
                'Referrer-Policy': 'origin-when-cross-origin',
            },
            params: {
                'url': url,
                'apikey': apikey,
                'premium_proxy': 'true',
                'custom_headers': 'true',
            },
        });

0Xero7 avatar Jul 15 '23 10:07 0Xero7