Hey, did you try to call that API with a proper HTTP method using Postman or some other tool? Can you make sure that your code uses the acceptable HTTP method (GET, POST, PUT, DELETE, etc.) that is supported by this specific API endpoint?
Postman it’s the tool which you can use to send API request and receive response.
It is very useful tool to testing APIs.
Here you have short overview what you can achieve use the Postman: