> 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/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state.md).

# Authentication, users and connection state

Authentication, users and connection state

Common questions about authentication, users and connection state.

{% prompt description="Inspect a user's connections and auth events" icon="terminal" openInAIProviders="true" defaultExpanded="full" %}

```markdown
List the connections for reference_id test-1, tell me which are active, and show me the last auth event for each.

Use the Terra CLI: brew install tryterra/tap/terra, or npm install -g @tryterra/cli, then terra login. Run terra docs ask --question "<question>" for anything you need from the Terra docs, and terra <command> --help for usage.
```

{% endprompt %}

## Articles

{% content-ref url="/pages/cjmqQs1FgMu1MpxEOQDM" %}
[How do I deauthenticate users in bulk?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/deauthenticate-users.md)
{% endcontent-ref %}

{% content-ref url="/pages/ZsdqRmWqb3DWYvmM3omn" %}
[Why are there multiple Terra users for one reference\_id?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/multiple-terra-users-per-reference-id.md)
{% endcontent-ref %}

{% content-ref url="/pages/nQl7qpPvoc793ECx3bTI" %}
[How do I detect whether a user connected a wearable?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/detect-connection-and-list-users.md)
{% endcontent-ref %}

{% content-ref url="/pages/2GhIKxYB3VyhCUcegjKB" %}
[Why are multiple user\_ids created for one reference\_id?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/user-uniqueness-reference-id.md)
{% endcontent-ref %}

{% content-ref url="/pages/a0PYk7jh7ljAFmndSC0s" %}
[Why does getUserId return null after init?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/verify-connection-getuserid-not-checkauth.md)
{% endcontent-ref %}

{% content-ref url="/pages/igFm3KhdWTL4EX3lVYPM" %}
[How do I detect an existing native SDK connection?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/detect-existing-connection-disconnect.md)
{% endcontent-ref %}

{% content-ref url="/pages/kvFuqmPJutmvVKnM0UIL" %}
[How do I start user authentication?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/auth-flow-start.md)
{% endcontent-ref %}

{% content-ref url="/pages/Iu9sa22qfm8I6Ci2jRkQ" %}
[Can I share one reference\_id across multiple users?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/reference-id-uniqueness-per-user.md)
{% endcontent-ref %}

{% content-ref url="/pages/hBpGhOrQ5Wazm3f1ctZe" %}
[How do I get a user's MyFitnessPal username from user\_id?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/get-provider-username-via-athlete.md)
{% endcontent-ref %}

{% content-ref url="/pages/R5GI5yYTmLd3ya4qGEj6" %}
[How do I verify a connection with userInfo?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/userinfo-verification-flow.md)
{% endcontent-ref %}

{% content-ref url="/pages/ZZAVRP3baNaXz3h223iL" %}
[What triggers an Omron deauth event?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/omron-deauth-event-trigger.md)
{% endcontent-ref %}

{% content-ref url="/pages/RHMvn8uMfWABReYzw9FO" %}
[Why no new auth event when Apple Health reconnects?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/apple-no-auth-event-on-reconnect.md)
{% endcontent-ref %}

{% content-ref url="/pages/FFqT6gRqgrXAkTnm1hpC" %}
[Why does InBody error that the API version is unsupported?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/expired-auth-link.md)
{% endcontent-ref %}

{% content-ref url="/pages/lDmue5BjTyYopkXmggtH" %}
[Can I get the provider OAuth tokens Terra holds?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/provider-oauth-tokens-not-exposed.md)
{% endcontent-ref %}

{% content-ref url="/pages/lzSSzu04lvwZ1jYEAeQs" %}
[Is there a pending state or timeout for initConnection?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/initconnection-no-pending-state.md)
{% endcontent-ref %}

{% content-ref url="/pages/EmnnCqKrJ1fZaz9vfB2I" %}
[Can providers connect without the widget?](https://docs.tryterra.co/help-center/help-topics/data-api-sdk/authentication-users-and-connection-state/widget-optional-direct-api-auth.md)
{% endcontent-ref %}
