{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","tabs","tab"]},"redocly_category":"SDK Reference","type":"markdown"},"seo":{"title":"Migration to v3.x","description":"Everything about Mosaic Journeys, SDKs, and APIs","siteUrl":"https://developer.transmitsecurity.com/","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"migration-to-v3x","__idx":0},"children":["Migration to v3.x"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This guide helps you migrate your Android Fraud Prevention integration to version 3.x."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Important"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Version 3.x includes breaking changes that will cause runtime errors if not addressed. Review all changes before upgrading."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"whats-new","__idx":1},"children":["What's new"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Breaking changes"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setUserID()"]}," is renamed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setAuthenticatedUser()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," is now a mandatory parameter in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimUserId"]}," in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ActionEventOptions"]}," is deprecated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," instead."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["New features"]},":"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserIdType"]}," parameters in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ActionEventOptions"]}," for typed user identification."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["TSClaimedUserIdType"]}," enum for specifying the type of claimed user ID."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"migrate-your-integration-to-v3x","__idx":2},"children":["Migrate your integration to v3.x"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-1-update-sdk-dependency","__idx":3},"children":["Step 1: Update SDK dependency"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Update your ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["app/build.gradle"]}," dependency:"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"dependencies {\n    implementation(\"com.ts.sdk:accountprotection:2.1.+\")\n}\n","lang":"gradle"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"gradle","header":{"controls":{"copy":{}}},"source":"dependencies {\n    implementation(\"com.ts.sdk:accountprotection:3.+\")\n}\n","lang":"gradle"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-2-add-baseurl-to-initialization","__idx":4},"children":["Step 2: Add baseUrl to initialization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you initialize the SDK with explicit parameters using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["initialize()"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," is now a required parameter. The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["baseUrl"]}," value must include the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/risk-collect/"]}," path."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you initialize using ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["strings.xml"]},", make sure it includes ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["transmit_security_base_url"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"xml","header":{"controls":{"copy":{}}},"source":"<resources>\n    <string name=\"transmit_security_client_id\">\"CLIENT_ID\"</string>\n    <string name=\"transmit_security_base_url\">https://api.transmitsecurity.io/risk-collect/</string>\n</resources>\n","lang":"xml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-3-rename-setuserid-to-setauthenticateduser","__idx":5},"children":["Step 3: Rename setUserID to setAuthenticatedUser"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setUserID()"]}," method has been renamed to ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["setAuthenticatedUser()"]},". Update all occurrences in your code."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setUserID(userId)\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setUserID(userId);\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setAuthenticatedUser(userId)\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"TSAccountProtection.setAuthenticatedUser(userId);\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-4-update-triggeraction-options","__idx":6},"children":["Step 4: Update triggerAction options"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimUserId"]}," property in ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ActionEventOptions"]}," is deprecated. Use ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserId"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["claimedUserIdType"]}," instead."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Before:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"object : ActionEventOptions {\n    override val correlationId: String?\n        get() = correlationIdStr\n    override val claimUserId: String?\n        get() = claimUserIdStr\n    override val referenceUserId: String?\n        get() = referenceUserIdStr\n}\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"new ActionEventOptions() {\n    @Override public String getCorrelationId() { return \"CorrelationIdStr\"; }\n    @Override public String getClaimUserId() { return \"ClaimUserIdStr\"; }\n    @Override public String getReferenceUserId() { return \"ReferenceUserIdStr\"; }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["After:"]},{"$$mdtype":"Tag","name":"Tabs","attributes":{"size":"medium"},"children":[{"$$mdtype":"Tag","name":"div","attributes":{"label":"Kotlin","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"kotlin","header":{"controls":{"copy":{}}},"source":"object : ActionEventOptions {\n    override val correlationId: String?\n        get() = correlationIdStr\n    override val claimedUserId: String?\n        get() = \"91e25bea0c...\" // hashed identifier\n    override val claimedUserIdType: TSClaimedUserIdType?\n        get() = TSClaimedUserIdType.EMAIL\n    override val referenceUserId: String?\n        get() = referenceUserIdStr\n}\n","lang":"kotlin"},"children":[]}]},{"$$mdtype":"Tag","name":"div","attributes":{"label":"Java","disable":false},"children":[{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"java","header":{"controls":{"copy":{}}},"source":"new ActionEventOptions() {\n    @Override public String getCorrelationId() { return \"CorrelationIdStr\"; }\n    @Override public String getClaimedUserId() { return \"91e25bea0c...\"; } // hashed identifier\n    @Override public TSClaimedUserIdType getClaimedUserIdType() { return TSClaimedUserIdType.EMAIL; }\n    @Override public String getReferenceUserId() { return \"ReferenceUserIdStr\"; }\n}\n","lang":"java"},"children":[]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"step-5-test-your-integration","__idx":7},"children":["Step 5: Test your integration"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Verify all SDK functionality works as expected."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Check for any runtime errors related to renamed methods."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Confirm that ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["triggerAction()"]}," returns action tokens as expected with the new parameter structure."]}]}]},"headings":[{"value":"Migration to v3.x","id":"migration-to-v3x","depth":1},{"value":"What's new","id":"whats-new","depth":2},{"value":"Migrate your integration to v3.x","id":"migrate-your-integration-to-v3x","depth":2},{"value":"Step 1: Update SDK dependency","id":"step-1-update-sdk-dependency","depth":3},{"value":"Step 2: Add baseUrl to initialization","id":"step-2-add-baseurl-to-initialization","depth":3},{"value":"Step 3: Rename setUserID to setAuthenticatedUser","id":"step-3-rename-setuserid-to-setauthenticateduser","depth":3},{"value":"Step 4: Update triggerAction options","id":"step-4-update-triggeraction-options","depth":3},{"value":"Step 5: Test your integration","id":"step-5-test-your-integration","depth":3}],"frontmatter":{"title":"Migration to v3.x","markdown":{"toc":{"depth":2}},"seo":{"title":"Migration to v3.x"}},"lastModified":"2026-05-25T13:41:40.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/sdk-ref/mobile/android/drs_migration","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}