pythontextnow icon indicating copy to clipboard operation
pythontextnow copied to clipboard

Inconsistent requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://www.textnow.com/api/users/[username]/messages

Open garycnew opened this issue 1 month ago • 1 comments

All:

Since July 2025, I've successfully used pythontextnow to send messages from several TextNow accounts.

Recently, I've noticed the 403 Client Error: Forbidden message begin to popup, again, with some of the accounts; while, other accounts still work without issue. All are on the same network. All source from the same Public IP Address. All have their own dedicated browser session on the same computer using different browsers (i.e., Chrome, Firefox, & Edge). All browser sessions are able to successfully initiate messages without issue.

In an attempt to resolve the issue... I will logout/login and update the SID_COOKIE for the affected accounts by way of the dedicated browser sessions. However, this seems to only occasionally resolve the pythontextnow issue.

I'm wondering if it's an issue with the pythontextnow cooldown or something else such as not passing the _pxhd cookie, which is set at the same time as the connect.sid cookie?

The strangest part is that it is only an issue with some of the pythontextnow accounts and not others.

In theory... TextNow should not be able to differentiate between the browser initiated messages and those initiated by pythontextnow.

Any thoughts from the pythontextnow community would be greatly appreciated.

Respectfully,

Gary

garycnew avatar Nov 20 '25 00:11 garycnew

Using wget, I have confirmed that TextNow requires that both the connect.sid & _pxhd must be set to the dedicated browser session for the POST request to be successful. A user configurable variable needs to be added to the pythontextnow code for the _pxhd cookie.

garycnew avatar Nov 20 '25 23:11 garycnew