A
A
Alex_Kuzen2021-08-26 06:37:05
Python
Alex_Kuzen, 2021-08-26 06:37:05

Python throws an error when trying to get data via request. How to decide?

import json
import requests

responce = requests.get('Вебхук для вызова rest api Bitrix24')
x = responce.text


print(x)


It gives this, {"error":"ERROR_METHOD_NOT_FOUND","error_description":"Method not found!"}

Process finished with exit code 0

How to decide, and what does it mean ?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Utkin, 2021-08-26
@DerNitro

It would be even more interesting to get the response code, I assume that there is 5xx, but what you see is what you wrote:
1. Sent a request
2. Received an answer
3. Displayed the answer on the screen,
try the same thing through curl to do, the answer is the same get.

E
Emil Revencu, 2021-08-26
@Revencu

Perhaps the webhook does not use the GET method. Try POST

H
HemulGM, 2021-08-26
@HemulGM

It looks like your request is not correct.
Most likely, you need to use not GET, but the one in the DOCUMENTATION. By the way, I recommend reading

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question