> 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/samsung-init-errors-token-devmode.md).

# Why does Samsung initConnection return invalid session token?

An invalid-session-token error on `initConnection` almost always means the SDK was initialised with a different dev ID from the one used to generate the auth token.

**Make sure init and your `generateAuthToken` call use the same dev ID**, and pass the raw token exactly as returned by the endpoint.

A generic `Unknown Error` on Samsung permission requests usually means Samsung Health Developer Mode is not enabled on the test device. To fix it:

{% stepper %}
{% step %}
Open Samsung Health > Settings > About Samsung Health.
{% endstep %}

{% step %}
Tap the version number repeatedly to enable Developer Mode.
{% endstep %}

{% step %}
Confirm Samsung Health is fully updated.
{% endstep %}

{% step %}
Confirm your app package name matches what is registered in the Samsung Developer Portal.
{% endstep %}
{% endstepper %}

If it persists, capture Logcat filtered on the Samsung store manager tag for the precise error.


---

# 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/samsung-init-errors-token-devmode.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.
