Both HTTPS and HTTP are supported. But HTTPS is recommended.
If you encounter issues using PATCH HTTP method, we support method override for POST calls via X-HTTP-Method-Override header.
Recommended encoding for request's payload - "application/json".
However "application/x-www-form-urlencoded" and "multipart/form-data" are also supported for POST requests.
If you want to make PATCH (or other non POST) request with encoding other then "application/json",
you should use POST method and set X-HTTP-Method-Override header.
Make use of our Testing Console to troubleshoot calls and visualize the full API requests.
RESTED browser extension for Google Chrome gives you access to your rested tabs seamlessly as needed.
Postman is an API platform that helps beginner and intermediate users build and use APIs in a step by step fashion.
After learning to make successful API calls through the above options, attempt to write your own code. An extension can help troubleshoot by separating client-code bugs from network issues.
Always check HTTP and our internal API error codes (described in API docs). No HTTP response indicates a problem on the client side.
Play with our Testing Console (launched from top of API docs page). It can give you a feel of what works and what doesn't through the use of examples to display how valid headers should look.
Observe correct formatting for JSON encoding and "urlencoded" encoding of "long_url." Also, don't forget to encode the "user:password" part of the header with base64 encoding. See the description of HTTP Basic authentication.
"long_url" should be part of the POST payload. And not simply attached to the URL.
Use PHP exception handling to see actual error
messages, like this: