# 2026-10-08 — A failed public access token names its task (improvement · API, SDK)

> When a task is created but its public access token cannot be generated, the create now answers 500 public_access_token_failed with the task's id, instead of 201 without the token.

A create that asks for `generate_public_access_token: true` used to answer
`201` without `public_access_token` when the token could not be generated.
The task was created either way, and nothing said the token was missing on
purpose.

It now answers `500 public_access_token_failed`, with the created task's id in
`error.task_id`:

```json
{
  "error": {
    "code": "public_access_token_failed",
    "message": "Task tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP was created and will run, but its public access token could not be generated. ...",
    "task_id": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"
  }
}
```

The task runs. Follow it from your server, by polling or a webhook, rather
than resending the request, which would create and charge a second task. In
the SDK, `MynthAPIError` carries the id as `taskId`.

See [request errors](/docs/api-reference/errors#request-errors).

Permalink: https://mynth.io/changelog/2026-10-08-public-access-token-failure · Markdown: https://mynth.io/changelog/2026-10-08-public-access-token-failure.md
