GIFs
5 routes. Paths are relative to https://api.intersink.com/v1.
- GET/gifs/channels/{channelId}/settingsThe channel's GIF settings (the API key is never returned, only whether it is set)
- PUT/gifs/channels/{channelId}/settingsSet the channel's Giphy key, on/off and ratings ("" clears)
- GET/gifs/media/{id}/{file}A GIF or MP4 from a proxy_media link (signed for one channel, expires)
- GET/gifs/searchSearch GIFs
- GET/gifs/trendingTrending GIFs
The channel's GIF settings (the API key is never returned, only whether it is set)
GET/gifs/channels/{channelId}/settings
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Response
200. The payload in data is not described in the spec yet.
Set the channel's Giphy key, on/off and ratings ("" clears)
PUT/gifs/channels/{channelId}/settings
Needs a signed-in user (Bearer token or access_token cookie).
Parameters
| Name | Type | Description |
|---|---|---|
| channelIdrequired | string, path |
Request body application/json
| Field | Type | Description |
|---|---|---|
| giphy_api_key | string | The channel's Giphy API key (write-only; "" removes it) At most 128 characters. |
| enabled | boolean | Turn GIFs on or off for the channel (default on) |
| rating | string | Default rating (default pg-13; "" resets) One of: "g", "pg", "pg-13", "r", "". |
| max_rating | string | Highest rating any request may get (default pg-13; "" resets) One of: "g", "pg", "pg-13", "r", "". |
| hourly_quota | number | Provider calls per rolling hour before answers come only from cache (default 80; null resets) Minimum 1, maximum 1000000. |
Response
200. The payload in data is not described in the spec yet.
A GIF or MP4 from a proxy_media link (signed for one channel, expires)
GET/gifs/media/{id}/{file}
Public: no sign-in needed.
Supports one byte range (Range: bytes=a-b), answered 206 with Content-Range, so video players can seek.
Parameters
| Name | Type | Description |
|---|---|---|
| idrequired | string, path | |
| filerequired | string, path | |
| crequired | string, query | Channel the link was made for, as given in the link Checked by the server against /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i. |
| erequired | string, query | Expiry (unix seconds), as given in the link |
| srequired | string, query | Signature, as given in the link |
Response
200. The payload in data is not described in the spec yet.
Search GIFs
GET/gifs/search
Public: no sign-in needed.
Results come from Giphy through this server: no address, account or device details reach Giphy. Show "Powered by GIPHY" with the results. 60 requests a minute per person.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | number, query | Items per page, 1 to 50 (default 24) Minimum 1, maximum 50. |
| offset | number, query | Where to start: next_offset of the previous page, up to 499 Minimum 0, maximum 499. |
| rating | string, query | Content rating. Defaults to the channel's rating and never goes above the channel's max_rating. One of: "g", "pg", "pg-13", "r". |
| proxy_media | boolean, query | true: image and video links point at this API, so the viewer's device never contacts the GIF provider. Default false (the provider's CDN). |
| qrequired | string, query | What to search for (up to 50 characters are used) At most 200 characters. |
| X-App-Key | string, header | The channel's publishable app key |
Response
200. data is object (GifPageDto).
| Field | Type | Description |
|---|---|---|
| itemsrequired | object[] | |
| items[].idrequired | string | |
| items[].titlerequired | string | |
| items[].widthrequired | number | |
| items[].heightrequired | number | |
| items[].previewrequired | object | Small animated GIF for grids |
| items[].preview.urlrequired | string | |
| items[].preview.wrequired | number | |
| items[].preview.hrequired | number | |
| items[].fullrequired | object | The GIF to send and show in a conversation |
| items[].full.urlrequired | string | |
| items[].full.wrequired | number | |
| items[].full.hrequired | number | |
| items[].mp4 | object | MP4 of the same GIF, smaller to load |
| items[].mp4.urlrequired | string | |
| items[].mp4.wrequired | number | |
| items[].mp4.hrequired | number | |
| next_offsetrequired | number | offset for the next page; null at the end |
| attributionrequired | string | Show "Powered by GIPHY" next to the results One of: "giphy". |
Trending GIFs
GET/gifs/trending
Public: no sign-in needed.
Same privacy and limits as search. Show "Powered by GIPHY" with the results.
Parameters
| Name | Type | Description |
|---|---|---|
| limit | number, query | Items per page, 1 to 50 (default 24) Minimum 1, maximum 50. |
| offset | number, query | Where to start: next_offset of the previous page, up to 499 Minimum 0, maximum 499. |
| rating | string, query | Content rating. Defaults to the channel's rating and never goes above the channel's max_rating. One of: "g", "pg", "pg-13", "r". |
| proxy_media | boolean, query | true: image and video links point at this API, so the viewer's device never contacts the GIF provider. Default false (the provider's CDN). |
| X-App-Key | string, header | The channel's publishable app key |
Response
200. data is object (GifPageDto).
| Field | Type | Description |
|---|---|---|
| itemsrequired | object[] | |
| items[].idrequired | string | |
| items[].titlerequired | string | |
| items[].widthrequired | number | |
| items[].heightrequired | number | |
| items[].previewrequired | object | Small animated GIF for grids |
| items[].preview.urlrequired | string | |
| items[].preview.wrequired | number | |
| items[].preview.hrequired | number | |
| items[].fullrequired | object | The GIF to send and show in a conversation |
| items[].full.urlrequired | string | |
| items[].full.wrequired | number | |
| items[].full.hrequired | number | |
| items[].mp4 | object | MP4 of the same GIF, smaller to load |
| items[].mp4.urlrequired | string | |
| items[].mp4.wrequired | number | |
| items[].mp4.hrequired | number | |
| next_offsetrequired | number | offset for the next page; null at the end |
| attributionrequired | string | Show "Powered by GIPHY" next to the results One of: "giphy". |