Get an API key
How a partner gets its partner API key, how to keep it safe, and how to replace or stop it.
Your systems call the partner API with a partner API key. The key starts with hfp_ and
belongs to your partner account, not to a person: it can see and change only your own licences.
Get your key
Make the key yourself in the partner portal:
- Sign in at
https://shop.hostfog.io/licence/partnerand open API & webhooks. - Click Make a key. The key is shown once: store it straight away in your secrets store, such as your provisioning system's encrypted settings or a vault.
Make a new key replaces it (the old one stops at once); Revoke stops it. Hostfog Ltd can also make the key for you under HQ › Partners.
The key is shown only once, also to Hostfog Ltd: the licence server keeps only a fingerprint of it (its SHA-256), never the key itself. A lost key cannot be looked up, only replaced.
Important: your bulk licences must be active (paid) for the key to work. Calls with the key of an account whose payments have stopped answer 403.
Use the key
Send the key in the Authorization header of every call:
curl -s https://api.hostfog.io/v1/licence/partner/licences \
-H "Authorization: Bearer hfp_…"
A missing or wrong key answers 401.
Keep it safe
- Keep the key on your own servers. Never put it in a customer's server, a browser page, a mobile app or a public repository.
- Give it only to the systems that create and delete servers.
- Replace it when someone who knew it leaves, and at least once a year.
Replace or stop a key
Do both yourself under API & webhooks in the partner portal:
| To | Click |
|---|---|
| Replace the key | Make a new key. The old one stops working at the same moment, so update your systems straight after. |
| Stop the key at once, for example after a leak | Revoke. Every call with it then answers 401; your servers and licences keep working. |
Tip: plan a replacement for a quiet hour: make the new key, put it in your systems, then check one
GET /licencescall.