Write a post
const url = 'https://api.gampeon.com/v1/posts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","as":"example","audience":"public","commentMode":"everyone","images":["example"],"share":1,"gif":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/posts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "as": "example", "audience": "public", "commentMode": "everyone", "images": [ "example" ], "share": 1, "gif": "example" }'Text with up to 3 links, up to 4 photos (upload them first with POST /v1/me/post-images), a GIF (gif, from GET /v1/gifs) or a shared post (share). audience sets who sees it (default public, under 16 friends); studio and game posts are always public. commentMode sets who can comment. @handle mentions notify that account (under 16 only from friends). The first link gets a preview card (title and site name). as posts in the name of a studio (owner or admin) or a game (people who can edit it). Control and formatting characters are rejected; more than two empty lines are shortened.
Not available with access tokens.
Rate limit: 10 per hour and 50 per day per account; 3 per day in the first 24 hours of an account; no identical text within 24 hours.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
Up to 1,000 characters and 3 links. Required unless there are photos, a GIF or a share
studio:SLUG or project:SLUG. Omit to post as yourself.
friends only for your own posts
ID of a public post to share. Shares of shares share the original
GIF ID (id from GET /v1/gifs). Not together with photos or a share
Responses
Section titled “Responses”Created
object
Plain text, up to 1,000 characters. Can be empty for photo and GIF posts and shares.
Unix time in milliseconds
Who can see it. Studio and game posts are always public
Up to 4 photos
object
Image path relative to the API (/v1/media/…)
object
Host without www.
Page title (og:title or
Mentioned handles that exist
Who can comment, as it applies (under 16: at most friends)
Pinned to the top of the timeline
object
All reactions together
Up to three most frequent reactions, most frequent first (for the icons)
Number per reaction, only reactions that occur
object
All reactions (older field)
Whether you reacted (older field)
The two newest top-level comments, oldest first
object
Plain text, up to 1,000 characters. Can be empty if there is a GIF
Unix time in milliseconds
Mentioned handles that exist (@handle in the text)
object
All reactions together
Up to three most frequent reactions, most frequent first (for the icons)
Number per reaction, only reactions that occur
object
Replies (top-level comments only)
You wrote it or manage the post
Whether you may delete it
Example
{ "author": { "type": "user" }, "audience": "public", "commentMode": "everyone", "reactions": { "top": [ "like" ] }, "myReaction": "like", "latestComments": [ { "reactions": { "top": [ "like" ] }, "myReaction": "like" } ]}Error codes: invalid_field, too_many_links, invalid_image_ref, invalid_gif
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: 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, forbidden, not_shareable
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"}Error codes: duplicate_post
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"}Limit: 10 per hour and 50 per day per account; 3 per day in the first 24 hours of an account; no identical text within 24 hours. Error codes: rate_limited
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: gifs_unavailable
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: gifs_unavailable
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"}