An API key lets a script, CI job or terminal call the pkgplane API as you, without your password. Create one key per place that uses it, so you can revoke one without breaking the others.
You need to be signed in to pkgplane. A key can’t create other keys, so this has to be done on the website or with a signed-in session.
Create the key
- Open API keys and select Create key.
- Give it a Name that says where it will live, such as
GitHub Actions: deploy. Add a Description if the name isn’t enough. - Choose when it Expires: 30, 90 or 365 days, or Never. You can’t change this later. Prefer an expiry for keys that leave your machine.
- Select Create key.
- Copy the key. It starts with
pkp_, and pkgplane shows it only this once: it stores a hash of the key, not the key itself. If you lose it, create a new one.
Store it
Keep the key out of source code and shell history. Put it in the secret store of the place that uses it, such as a GitHub Actions secret or your password manager, and read it from an environment variable:
env:
PKGPLANE_API_KEY: ${{ secrets.PKGPLANE_API_KEY }}Check it works
curl -H "Authorization: Bearer $PKGPLANE_API_KEY" https://pkgplane.richaisolutions.com/api/meA working key returns your account as JSON. A 401 means the key was mistyped, has expired or has
been disabled. See Authentication for every status code.
You can have up to 25 keys. The Last used column on the API keys page shows which ones are still in use, updated at most once a minute.