Tls failed to verify when sending API request
I have a python server hosted on railway, when it tries to call an external api like this:
https://pypi.org/project/tls-client/
session = tls_client.Session(
client_identifier="chrome_120",
random_tls_extension_order=True,
)
response = session.post(url, headers=headers, json=payload)
It shows this error:
ERROR:root:failed to do request: Post "URL";: tls: failed to verify certificate: x509: certificate signed by unknown authority
but it works locally, could it be a wrong setup of my certification in my server? or any ideas?
Solution:Jump to solution
i suggest you not run user bots on railway as that breaks the fair use agreement
11 Replies
Project ID:
4cc29972-e583-4641-81d0-26868fcc02e7
please provide more context
4cc29972-e583-4641-81d0-26868fcc02e7
so this request is sent in my server, when the request is sent it automatically returns the error I showed above, from what I researched it's due to the certification file not being found properly or something like that, I could add this onto the request for it to work: but then that's not secure
what service are you calling where you are trying to spoof a users browser?
it's for a gym, im trying to link my server to their service so I can create a custom ui and some other features
do they provide an official api? it looks like you are trying to spoof a user
theres no official one
then im sorry but we would not be able to help here
ah ok nws
Solution
i suggest you not run user bots on railway as that breaks the fair use agreement
okk