API: Episode Messages
In this page
The Episode Message object
Listeners can talk to episode authors by sending them public textual Messages. A message has the following properties:
Property | Type | Description |
---|---|---|
message_id |
Numeric | Unique message identifier |
episode_id |
Numeric | Unique episode identifier |
text |
String | Textual message |
created_at |
Timestamp | The timestamp at which the message was sent |
author_id |
Numeric | Message author’s user |
author_username |
String | Message author’s username |
author_fullname |
String | Message author’s display name |
author_site_url |
String | Message author’s public URL on Spreaker’s website |
author_image_url |
String | Message author’s small image URL |
author_image_original_url |
String | Message author’s original size image URL |
author_is_owner |
Boolean | true if the message author is the owner of the episode |
app_name |
String | The name of the app used to send the message |
app_url |
String | The URL to get the app used to send the message |
Retrieving an Episode’s Messages
GET /v2/episodes/EPISODE-ID/messages
Authenticated: no
This API returns a paginated list of Messages left on a given Episode. The list of messages is sorted anti-chronologically, from the most recent to the oldest.
Example
curl https://api.spreaker.com/v2/episodes/7912694/messages
{
"response": {
"items": [{
"message_id": 11204011,
"episode_id": 7912694,
"text": "Next Radio :radio: ! Podcasting \ud83c\udf99!",
"created_at": "2016-03-03 01:15:43",
"author_id": 8264480,
"author_username": "gnaudio",
"author_fullname": "Gail Nobles",
"author_site_url": "https://www.spreaker.com/user/gnaudio",
"author_image_url": "https://d1bm3dmew779uf.cloudfront.net/large/8d9645fcb02cc1da8fb5ce1ed98c4117.jpg",
"author_image_original_url": "https://d3wo5wojvuv7l.cloudfront.net/images.spreaker.com/original/8d9645fcb02cc1da8fb5ce1ed98c4117.jpg",
"author_is_owner": false,
"app_name": "iPad",
"app_url": "https://itunes.apple.com/app/id388449677"
}, {
"message_id": 11201716,
"episode_id": 7912694,
"text": "Thank you for listening!",
"created_at": "2016-03-02 23:02:02",
"author_id": 8114541,
"author_username": "spreakerliveevents",
"author_fullname": "Spreaker Live Show",
"author_site_url": "https://www.spreaker.com/user/spreakerliveevents",
"author_image_url": "https://d1bm3dmew779uf.cloudfront.net/large/da9b085ab425d819e5de6f978487a487.jpg",
"author_image_original_url": "https://d3wo5wojvuv7l.cloudfront.net/images.spreaker.com/original/da9b085ab425d819e5de6f978487a487.jpg",
"author_is_owner": true,
"app_name": "Desktop",
"app_url": "https://www.spreaker.com/download"
}],
"next_url": null
}
}
Leaving a Message
POST /v2/episodes/EPISODE-ID/messages
Authenticated: yes
The API POST /v2/episodes/EPISODE-ID/messages
supports these parameters:
Parameter | Type | Description |
---|---|---|
text |
String | Required. Max length: 4000 |
Example
curl -X POST -H "Authorization: Bearer OAUTH-TOKEN" -F "text=Hello world!" https://api.spreaker.com/v2/episodes/EPISODE-ID/messages
Deleting an Episode’s Message
DELETE /v2/episodes/EPISODE-ID/messages/MESSAGE-ID
Authenticated: yes
Delete the given episode’s message. This requires the request to be authenticated with the message or episode author’s credentials. A user can delete messages sent from him or herself, or messages left on their own episodes.
Example
curl -X DELETE -H "Authorization: Bearer OAUTH-TOKEN" https://api.spreaker.com/v2/episodes/7912694/messages/11201716
Reporting Abuse
POST /v2/episodes/EPISODE-ID/messages/MESSAGE-ID/report-abuse
Authenticated: yes
Report the specified episode message as spam or claim that it is violating Spreaker’s terms and conditions. Reported messages will be checked by Spreaker’s staff within 1 working day.
Example
curl -X POST -H "Authorization: Bearer OAUTH-TOKEN" https://api.spreaker.com/v2/episodes/EPISODE-ID/messages/MESSAGE-ID/report-abuse