ak_ prefix.1akarso auth login
ak_ API key ──> org membership check ──> pinned profile ──> connected accounts + posts
--profile:12345# List profiles to find their IDs akarso profiles list # Post from a different profile without creating a new key akarso posts create --text "Hello!" --platforms x --profile 01JXYZ...
--profile flag works on every command. The profile must belong to the same org as the API key. You can also set AKARSO_PROFILE_ID as an environment variable.| Priority | Source |
| 1 | --profile flag |
| 2 | AKARSO_PROFILE_ID env var |
| 3 | API key's pinned profile |
| 4 | Org's default profile |
12curl https://akarso.co/api/v2/profiles \ -H "Authorization: Bearer $AKARSO_API_KEY"
x-akarso-profile-id header:123curl https://akarso.co/api/v2/posts \ -H "Authorization: Bearer $AKARSO_API_KEY" \ -H "x-akarso-profile-id: 01JXYZ..."
1akarso auth set --key ak_your_key_here
| Priority | Source | Example |
| 1 | --api-key flag | akarso posts list --api-key ak_xxx |
| 2 | AKARSO_API_KEY env var | export AKARSO_API_KEY=ak_xxx |
| 3 | Config file | ~/.akarso/config.json |
~/.akarso/config.json:123{ "apiKey": "ak_your_key_here" }
akarso auth login and akarso auth set commands write this file automatically.1akarso auth check
| Variable | Description |
AKARSO_API_KEY | API key for authentication |
AKARSO_PROFILE_ID | Profile ID to override the key's pinned profile |
AKARSO_API_URL | Custom API base URL (for development) |
--api-key flag is useful for one-off commands or when switching between multiple keys. For regular use, set the env var or save to the config file.