Messages of a channel
const url = 'https://api.gampeon.com/v1/communities/1/channels/1/messages';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.gampeon.com/v1/communities/1/channels/1/messages \ --header 'Authorization: Bearer <token>'Without parameters the newest page (oldest first inside the page); before loads older pages. For updates, poll every 2 to 5 seconds with updatedSince set to now from the previous answer: you get new, edited and removed messages since then (removed ones as placeholders). Slow down or stop polling while the window is hidden.
Not available with access tokens.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Community ID
Channel ID
Query Parameters
Section titled “Query Parameters”Message ID: only older messages
Time from now of the last answer
1 to 100 (default 50)
Responses
Section titled “Responses”Messages
object
object
Handles mentioned with @
Unix time in milliseconds
Unix time in milliseconds
object
Deleted by the author, removed by community moderators or by GAMPEON
Unix time in milliseconds
Unix time in milliseconds
Server time, use it for the next updatedSince
Example
{ "messages": [ { "replyTo": { "removed": true } } ]}Error codes: unauthorized
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: not_found
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}