API - Quickstart
This guide gets you from nothing to your first authenticated response in a few minutes. You'll switch the API on, make a token, and read from your account.
1. Switch on API access
The API is off until you turn it on. An account administrator does this once, in the admin under Settings → API → Settings: switch API Access on and click Update.
403 api_not_enabled no matter which token you use.2. Make a token
For a server-to-server integration, the credential you want is a service token: an account-wide key you send as a bearer token. You make one in the admin under Settings → API → API Tokens. Give it a name, choose the scopes it needs (start read-only), and create it.
Your token looks like dpg_api_live_…, and you'll only see the full value once, so copy it somewhere safe as soon as it's created.
3. Make your first call
Ask the API who you are and what you're allowed to do:
curl https://api.digitalphotogallery.com/v1/me \
-H "Authorization: Bearer dpg_api_live_YOUR_TOKEN"{
"account": { "uuid": "…", "name": "My Festival", "unique_id": "myfest" },
"service_token": { "uuid": "…", "name": "My integration" },
"capabilities": ["api.images.read"]
}That capabilities list is exactly what your token can do, and it's worth a look before you try a write.
4. Read some images
curl "https://api.digitalphotogallery.com/v1/images?limit=5" \
-H "Authorization: Bearer dpg_api_live_YOUR_TOKEN"You'll get back a JSON array of images, each with its public_uuid, title, metadata and version URLs. Keep an eye on the X-Has-More and X-Next-Offset response headers; they tell you whether there's another page to fetch.
Where to next
Authentication covers scopes and the sign-in flow for user tokens, and Operations covers the one idea behind every change you'll make.