# Authentication and permissions

Grant the access a workflow needs and keep account identity explicit.

Canonical page: https://jobhunt.app/support/developers/authentication/scopes-and-accounts
Updated: 2026-11-17
Audience: developers
Topic: Authentication
Type: concept
Catalog revision: f77de0f4803debf8c5aaac1702865d976a380e994ea7f572d4e571c044d5495f
Contract SHA-256: acfda93724db1a3f53160a30bc5891f447ad14601f26b02ff4cacd7c17d0812e

## Steps

1. **Use discovery for OAuth**

   Read /.well-known/oauth-protected-resource and its authorization-server metadata. The authorization code flow uses PKCE.

2. **Request specific scopes**

   Read and write are distinct. Use each operation’s declared scopes, then check its description for resource-dependent or consequential-action requirements. A key or connection with read:applications receives a job’s details without your screening answers and document workflow state.

3. **Create an API key for a script**

   API keys are for your own scripts and integrations; an assistant connects by signing in and never needs a key pasted into a chat. Open Account settings and choose Create API key in the API keys section. Every permission in the list starts selected, which gives the key read and edit access to all of your saved work, including creating and revoking other API keys. To choose fewer, open Permissions, choose Deselect all, then tick Read or Edit for each area the script needs. Review key then lists exactly what the key will be able to do; nothing is created until you choose Create key. Save the key when it is shown, and revoke it in the same section when you no longer need it. A key with no permissions can be created but cannot read or change anything.

4. **Handle access changes**

   Respect expiration, revocation and ownership checks on every call. Refresh or reconnect through the supported authorization flow.

## Expected result

A supplied account ID is an integrity check. The credential remains the source of account authority.

## Troubleshooting and recovery

Do not respond to a permission failure by silently switching accounts or broadening scopes. Browser sessions also retain their session and CSRF requirements. A request that sends an Authorization Bearer token JobHunt does not recognise is refused with HTTP 401, even if the browser is signed in; it does not fall back to the browser session. If you get a 401, fix or remove the token.

## API operations

### get_connected_account

Identify the JobHunt account connected by these credentials. The opaque account ID stays unchanged across renaming, reconnection and token refresh. This does not select or change a resume contact profile.

- Interface: GET /api/v1/journey/get_connected_account
- Access: read
- Destructive: no
- Availability: connected-journey
- Required permissions: read:profile
- [Operation and exact schemas](https://jobhunt.app/support/operations/get_connected_account.json)
- [Operation Markdown](https://jobhunt.app/support/operations/get_connected_account.md)

## Related guides

- [Make your first API request](https://jobhunt.app/support/developers/getting-started/first-request.md)
- [Connect through MCP](https://jobhunt.app/support/developers/mcp/connect-your-assistant.md)
- [Set up the CLI prerelease](https://jobhunt.app/support/developers/cli/set-up-the-cli.md)
