> 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/connecting/apple-health-health-connect-and-mobile-sdk/samsung-production-sdk-switch-and-signing.md).

# Why does Samsung Health throw AuthorizationException 2000 in release but work in debug?

There's no Samsung Developer ID to add on the Terra SDK or in your app code. If Samsung Health throws `AuthorizationException 2000` ('app not allowed to read steps') in a release build but works in debug, check these three causes:

{% stepper %}
{% step %}
**Signing-key / registration mismatch.** Samsung authorises your app by matching the Android package name and the release-build signing certificate SHA-256 fingerprint against what you registered in Samsung's partner portal. Confirm both the release `applicationId` and the release SHA-256 are registered and approved. If you use Play App Signing, use the Play Console App signing SHA-256. If you only registered the debug fingerprint, add the release one before going live.
{% endstep %}

{% step %}
**Permission mismatch.** Confirm the read permissions your app requests match what was approved, and that the user actually granted them.
{% endstep %}

{% step %}
**ProGuard / R8 stripping.** Release builds shrink code, which can strip classes the SDK needs. Add a keep rule for `com.samsung.android.**` in your release ProGuard config.
{% endstep %}
{% endstepper %}

Use the Samsung-tagged Terra SDK build: it is the same `co.tryterra:terra-android` artifact with a `samsung`-tagged version on Maven Central (look for `samsung` in the version), not a separate artifact.

If all three check out and the error persists, contact support with your package name and the user\_id. In some cases a pre-obfuscated AAR means keep-rules do not reliably fix Parcelable deserialisation, which is a known issue we handle on our side.
