Why does creating a link token return an error?
A 422 from POST /api/embedded/v1/link/create-link-token means a field in the request body failed validation, most often an integration value that isn't an exact integration slug. Look up the slug on the Integrations page. For example, iSolved's slug is isolved_sftp, not isolved.
The response's detail lists each failing field under loc with the reason in msg.
Symptoms and fixes
422 Unprocessable Entity
Check each required field:
integration: the exact slug, as listed on the Integrations page.category: one ofHRIS,ATS,LMSorCUSTOM.end_user_data.org_name: at least 2 characters.end_user_data.origin_id: your own unique ID for this customer.end_user_data.email: optional, but must be a valid email address if you send it.
401 Unauthorized
The API key is missing or invalid. Send Authorization: Bearer <BINDBEE_API_KEY> from your server. Never call this endpoint from the browser, because it takes your API key.
403 Forbidden
Your credentials are valid, but the category or integration isn't enabled for your account. Call Get Integrations and check is_enabled for the slug, or contact us to enable it.
429 Too Many Requests
You hit the rate limit. Wait for the time in the Retry-After header, then retry.
The token works, but the connector lands in the wrong environment
The API key decides the environment. A Development key creates a Development connector and a Production key creates a Production one. Create the link token with the key for the environment you want.