Quickstart
This walkthrough takes you from nothing to a successful API call. You’ll list
support tickets, but the same steps work for any product — only the
audience, endpoint, and permissions change.
You’ll need: an organization admin account for the GistLink suite.
-
Create an IAM user.
Sign in and open Settings → Security → IAM users (
https://settings.gist.link/dashboard/security/iam-users), then choose New IAM user. Give it a descriptive name (for exampleticket-sync-bot) and grant it the permissions it needs:support:query:ticketssupport:query:ticketsupport:mutation:createTicketPermissions use the
<app>:query|mutation:<field>grammar — one entry per operation, with optional trailing wildcards. See Permissions for the full grammar. -
Issue an API key.
On the IAM user’s page, choose Issue key. You can narrow the key to a subset of the user’s permissions (useful for handing different keys to different systems). You’ll receive:
- a key id —
gciam_followed by hex, safe to store in config; and - a one-time secret —
gcsk_…, displayed once, never again.
Store the secret in your secret manager immediately. If it’s lost, rotate the key to get a new one.
- a key id —
-
Exchange the key for an access token.
IAM keys use the standard OAuth
client_credentialsgrant against the auth token endpoint. Theaudiencenames the one product the token will work on and is required:Terminal window curl https://auth.api.gist.link/oauth/token \-u 'gciam_your_key_id:gcsk_your_secret' \-d grant_type=client_credentials \-d audience=support{"access_token": "eyJhbGciOiJSUzI1NiIs…","token_type": "Bearer","expires_in": 900,"scope": "support:query:tickets support:query:ticket support:mutation:createTicket"}The token expires after
expires_inseconds (15 minutes by default) — just request a new one when it does. IAM exchanges never return a refresh token. Full endpoint details: Authentication. -
Call the API.
Send GraphQL over
POSTwith the token as a Bearer header:Terminal window ACCESS_TOKEN="eyJhbGciOiJSUzI1NiIs…"curl https://support.api.gist.link/graphql \-H "Authorization: Bearer $ACCESS_TOKEN" \-H 'Content-Type: application/json' \-d '{"query": "query { tickets(first: 10) { totalCount edges { node { id subject status created_at } } } }"}'const tokenRes = await fetch('https://auth.api.gist.link/oauth/token', {method: 'POST',headers: { 'Content-Type': 'application/json' },body: JSON.stringify({grant_type: 'client_credentials',client_id: process.env.GC_KEY_ID,client_secret: process.env.GC_KEY_SECRET,audience: 'support',}),});const { access_token } = await tokenRes.json();const res = await fetch('https://support.api.gist.link/graphql', {method: 'POST',headers: {Authorization: `Bearer ${access_token}`,'Content-Type': 'application/json',},body: JSON.stringify({query: 'query { tickets(first: 10) { totalCount edges { node { id subject status created_at } } } }',}),});const { data, errors } = await res.json();if (errors) throw new Error(errors[0].message);console.log(data.tickets.edges.map((e) => e.node));<?phpfunction post(string $url, array $payload, array $headers = []): array{$ch = curl_init($url);curl_setopt_array($ch, [CURLOPT_POST => true,CURLOPT_RETURNTRANSFER => true,CURLOPT_HTTPHEADER => array_merge(['Content-Type: application/json'], $headers),CURLOPT_POSTFIELDS => json_encode($payload),]);$body = json_decode(curl_exec($ch), true);curl_close($ch);return $body;}$token = post('https://auth.api.gist.link/oauth/token', ['grant_type' => 'client_credentials','client_id' => getenv('GC_KEY_ID'),'client_secret' => getenv('GC_KEY_SECRET'),'audience' => 'support',])['access_token'];$result = post('https://support.api.gist.link/graphql',['query' => 'query { tickets(first: 10) { totalCount edges { node { id subject status created_at } } } }'],['Authorization: Bearer ' . $token],);if (isset($result['errors'])) {throw new RuntimeException($result['errors'][0]['message']);}print_r(array_column($result['data']['tickets']['edges'], 'node'));import osimport requeststoken = requests.post("https://auth.api.gist.link/oauth/token",json={"grant_type": "client_credentials","client_id": os.environ["GC_KEY_ID"],"client_secret": os.environ["GC_KEY_SECRET"],"audience": "support",},timeout=30,).json()["access_token"]body = requests.post("https://support.api.gist.link/graphql",headers={"Authorization": f"Bearer {token}"},json={"query": "query { tickets(first: 10) { totalCount edges { node { id subject status created_at } } } }"},timeout=30,).json()if body.get("errors"):raise RuntimeError(body["errors"][0]["message"])print([edge["node"] for edge in body["data"]["tickets"]["edges"]])
Where to next
Section titled “Where to next”- Browse the Support API reference — or any of the other services — for every operation, argument, and required permission.
- Read API conventions before writing production integrations (pagination, money, dates).
- Handle failures with Errors & rate limits.