Personal API
Errors
The response codes and what to do with each.
Every error comes back as JSON, with a message you can show to the person. The message is in the language of the Accept-Language header (pt-BR, en or es; Portuguese when absent):
{ "error": "This token can only read this vault." }| Code | When it happens | What to do |
|---|---|---|
400 | A field is missing or the format is wrong | Fix the request. The message says what. |
401 | Token missing, malformed, invalid, revoked or expired | Ask the person for a new token. Don't retry with the same one. |
403 | No permission for the vault, calendar or attachments; account differs from the one in X-Paper-Account; developer mode off; banned account | Don't insist. Tell the person what's missing. |
404 | Vault or page not found | Check the ids with GET /vaults and GET /vaults/{vault}/pages. Vaults must be synced with Google Drive. |
409 | Google or the calendar wasn't allowed for the API, or the person revoked access in Google | The person needs to open the app and allow it again in Settings → Developer. |
413 | File or text too large | Split or shrink it. See Limits. |
423 | Page protected by a password | Leave the page alone. No token opens it. |
429 | Request or upload limit | Wait and try again, with growing intervals. |
500 | An error on our side | Try again in a few minutes. If it repeats, tell support. |
502 | Google Drive or Google Calendar failed | Try again later. |
503 | Service under maintenance | Try again later. |
Retrying
Retrying only makes sense on 429, 500, 502 and 503. Use growing intervals and a cap on attempts. The other codes don't change by themselves.