leogomezz4t / PyTextNow_API

Python texting API utilizing TextNow API
MIT License
69 stars 42 forks source link

Getting Status Code 520 when sending message #51

Closed kk-deng closed 2 years ago

kk-deng commented 2 years ago

Hi all,

I have been using this for a few days and it was working fine generally, although sometimes I got 400 error. With a couple of tries, it would go through. However, I have been getting this error since last night and today I can't send any message out even though I signed in to the webpage and got a new sid_cookie_key and csrf_cookie_key. I tried to change the User Agent in the header and it didn't work too.

Did it get detected by TN? LOL

Thank you so much for your help. Really want to contribute to this project but don't know where to start.

Could not send message. server return a Server error. Request Failed.
Status Code: 520
leogomezz4t commented 2 years ago

I tried it yesterday and it worked however an error code of 520 means that textnow has installed cloudflare now. I'll do some more testing but if they have cloudflare then it will be very difficult to get it to work

kk-deng commented 2 years ago

I tried it yesterday and it worked however an error code of 520 means that textnow has installed cloudflare now. I'll do some more testing but if they have cloudflare then it will be very difficult to get it to work

Thank you for the quick reply. Sure, if that's the case, maybe we could use cloudscraper or cfscrape to bypass it?

leogomezz4t commented 2 years ago

Thanks to a pull request by @zswierz, cloudscraper has been implemented and fixed this issue in the new 1.2.0 update