Create a credentials file
Verify the account first, then generate ~/.claude/.credentials.json from your Claude session.
- 1Paste
- 2Verify
- 3Generate
Need this from a script? The same convert is available as a public JSON API. API documentation
claude credentials
# after convert: ~/.claude/.credentials.json✔ session verified — you@example.com · Claude Maxwrote claudeAiOauth { accessToken, refreshToken, expiresAt }❯ claude✔ Logged in as you@example.com — Claude Max