Get Instant Solutions for Kubernetes, Databases, Docker and more
Plivo is a leading cloud-based communication platform that provides a suite of APIs for voice and SMS services. It enables developers to integrate communication capabilities into their applications seamlessly, allowing for efficient and scalable messaging solutions. Plivo's SMS API is particularly popular for sending and receiving text messages globally, offering features such as delivery reports, message queuing, and more.
When using the Plivo API, you might encounter an error message stating 'Unsupported Media Type'. This error typically occurs when the API request is made with a media type that is not recognized or supported by Plivo. As a result, the request fails, and the intended SMS is not sent.
The 'Unsupported Media Type' error is an HTTP status code 415. It indicates that the server refuses to accept the request because the payload format is in an unsupported format. In the context of Plivo, this usually means that the Content-Type header in your HTTP request is not set to a supported value.
Plivo's API documentation specifies the supported media types for requests. Typically, for sending SMS, the Content-Type should be set to application/json
or application/x-www-form-urlencoded
. Using any other media type will result in this error.
To resolve this issue, follow these steps:
Content-Type: application/json
By ensuring that your API requests adhere to the supported media types specified by Plivo, you can avoid the 'Unsupported Media Type' error and ensure successful SMS delivery. Always refer to the latest Plivo documentation for updates and best practices.
(Perfect for DevOps & SREs)
(Perfect for DevOps & SREs)