> For the complete documentation index, see [llms.txt](https://docs.tryterra.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tryterra.co/faq/help-topics/data-api-sdk/mobile-sdk-setup-permissions-and-crashes/permission-prompt-reappears-on-init.md).

# Why does Health Connect re-prompt permissions on init?

On Android with Health Connect, `initTerra` **automatically re-requests permissions when the device previously had a connection and the user still exists server-side** (for example after an app uninstall and reinstall), in order to restore connection state. It does not prompt users who never connected.

To avoid the prompt:

* When switching accounts on the same device, **deauthenticate the previous user before initialising for the new one**. Periodic deauth of long-inactive users also keeps connections and billing quota clean.
* On iOS, debug builds can change the device ID the SDK picks up, making each install look like a new connection. iOS also re-prompts whenever the requested permission set changes between releases, so always call `initConnection` with a constant, explicit list of `CustomPermissions` rather than an empty array.

If the prompt appears on devices that never enabled the connection, share a `user_id` or `reference_id` so support can check connection state, and **update to the latest SDK**.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tryterra.co/faq/help-topics/data-api-sdk/mobile-sdk-setup-permissions-and-crashes/permission-prompt-reappears-on-init.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
