Getting Started
Create a Gifli account, register an app, create a service account, and make your first authenticated API call.
This guide walks through the setup a backend integration needs to do once, and then the per-user flow for creating service accounts.
Base URL
https://api.gifli.pictures/v1/One-time setup
Create a Gifli account. Apps are owned by a user, so you need an account first.
Create an app in your settings and obtain the token.
Per-user setup
For each user in your system, create one service account. You only do this once per user.
curl -X POST https://api.gifli.pictures/v1/apps/{appId}/serviceAccounts/ \
-H "Authorization: Bearer aBcDeFgH..." \
-H "Content-Type: application/json" \
-d '{"displayName": "user-123"}'{
"id": "sa_clxyz...",
"appId": "app_clxyz...",
"displayName": "user-123"
}Store the service account id mapped to your internal user ID.
New apps support up to 5 service accounts. To raise the limit to 100,000, submit a verification request from the Apps API.
Making API calls on behalf of a user
Pass the app API key in Authorization and the service account ID in X-Service-Account-Id. Gifli resolves this to the service account's user context.
curl -X POST https://api.gifli.pictures/v1/gifs/ \
-H "Authorization: Bearer gk_aBcDeFgH..." \
-H "X-Service-Account-Id: sa_clxyz..." \
-F "file=@reaction.gif" \
-F "name=Reaction"curl https://api.gifli.pictures/v1/gifs/me \
-H "Authorization: Bearer gk_aBcDeFgH..." \
-H "X-Service-Account-Id: sa_clxyz..."Search only (this is what you want if you want max privacy)
Search is public and does not require any credentials.
curl "https://api.gifli.pictures/v1/gifs/search?q=funny+cat&limit=10"