We are sunsetting On-Premises API. Refer to our On-Premises API Sunset document for details, and to learn how to migrate to our next-generation Cloud API.
/v1/settings/application/media/providers
Use the /v1/settings/application/media/providers
endpoint to compile a list of media providers for sending media links. A providers list allows you to have different media providers for the same provider type while being able to pick a provider to use on a per request basis.
Use this API request to retrieve the providers list.
GET /v1/settings/application/media/providers
The successful response includes the list of providers:
"settings": { "application": { "media": { "providers": [ { "name": "your-first-provider", "type": "www", "config": { "basic": { "username": "your-username", "password": "your-password" } } }, { "name": "your-second-provider", "type": "www", "config": { "bearer": "your-bearer-token" } } ] } } }
An unsuccessful response contains an error message. See Error and Status Codes for more information on errors.
To configure providers for the WhatsApp Business API Client, use the /v1/settings/application/media/providers
endpoint with the provider's information. Currently, you can only set up one provider at a time. Also, you can only use these provider objects for sending media messages using HTTP/HTTPS
links that rely on either basic authentication or bearer token authentication.
The below examples shows adding a WWW (HTTP/HTTPS links) provider with basic authorization and a provider with bearer token authentication. Currently, these are the only supported provider formats.
POST /v1/settings/application/media/providers [{ "name": "your-first-provider", "type": "www", "config": { "basic": { "username": "your-username", "password": "your-password" } } } ]
POST /v1/settings/application/media/providers [{ "name": "your-second-provider", "type": "www", "config": { "bearer": "your-bearer-token" } } ]
A successful request returns the HTTP Status Code 200 OK
and either null
or {}
.
An unsuccessful response contains an error message. See Error and Status Codes for more information on errors.
Be sure to give each provider a unique name as reusing a name overwrites the previous entry.
Name | Description |
---|---|
| Required. The name for the provider |
| Required. The type of provider |
| Required. The |
Send a DELETE
API call with the name
of a provider to the /v1/settings/application/media/providers
endpoint to delete that provider from your list.
DELETE /v1/settings/application/media/providers/your-config-name
A successful request returns the HTTP Status Code 200 OK
and either null
or {}
.
An unsuccessful response contains an error message. See Error and Status Codes for more information on errors.