Administration
API keys
Keys for scripts and other apps to use Hubstruct's API as you.
An API key lets a script or another app use Hubstruct's API as you, without your password. Use one to upload in bulk, export tags, build an integration, or automate anything the app can do.
Making a key
On your Profile, under API keys:
- Give the new key a name that says what it's for, such as
photo-import script. - Choose Create key.
- Copy the key now. It's shown once, as it's made. Hubstruct keeps only a hash of it, so it can't be shown again.
A key looks like hs_ followed by 43 random characters. The list shows each key's name, its first characters (to tell keys apart), when it was made and when it was last used.
Using a key
Send it in the Authorization header, as a bearer token:
curl -H "Authorization: Bearer hs_…" \
https://photos.example.com/api/libraries
A key can do whatever you can, with one exception: it can't manage API keys. Keys are only made and revoked from a signed-in session, so a key that leaks can't make itself a replacement or cover its tracks.
Revoking a key
On your Profile, choose Revoke next to the key. It stops working at once. A live stream opened with it ends at its next check.