Hello! I am trying to implement OTP in my Android ...
# support-questions-legacy
a
Hello! I am trying to implement OTP in my Android app but the SuperTokens object isn't saving the session information. I am wondering if I initialized SuperTokens incorrectly (or something else) SuperTokens.Builder(applicationContext, apiDomain) .apiBasePath("/api/auth") .build() I can hit apiDomain on my local machine so we can assume this is correct I can see all the session data that I want in the response in logcat but I somehow can't access it in the SuperTokens object
r
hey @aleeza333 can i see the request and response headers of the sign in api call please?
a
Here is the response
Copy code
X-Frame-Options: SAMEORIGIN
 X-XSS-Protection: 1; mode=block
 X-Content-Type-Options: nosniff
 X-Download-Options: noopen
 X-Permitted-Cross-Domain-Policies: none
 Cross-Origin-Opener-Policy: same-origin
 Referrer-Policy: no-referrer
 Access-Control-Allow-Origin: http://www.stack.website.io:3002
 Vary: Origin, Accept-Encoding
 Access-Control-Allow-Credentials: true
 Cache-Control: no-cache, no-store, max-age=0, must-revalidate
 Content-Type: application/json; charset=utf-8
 ETag: "1178nd9mfi54n"
 Content-Length: 167
 Date: Fri, 12 Apr 2024 12:25:38 GMT
 Connection: keep-alive
 Keep-Alive: timeout=5
 {"status":"OK","deviceId":"u7BfKlHMnSHRre9v6O98XM3aa+TEKdgjTbgkU6e8wVQ=","flowType":"USER_INPUT_CODE","preAuthSessionId":"DuRE1QuWR-fHgDHPdHhxkL3IRnHPhnesUQn-pnb_0yE"}
This is the request
Copy code
Content-Type: application/json; charset=UTF-8
Content-Length: 58
Mobile-Application-Version: android.debug
Mobile-Anonymous-User-Id: fIsb3RkPTCGoiHx5j99ide
User-Agent: Mobile-Android/5.3.0.debug (sdk_gphone64_arm64; Android 13)
{"email":"aleeza@mobile.com,”platform":"android"}
Hello! We actually figured it out 😅 Our domain was missing www and we didn't add the SuperTokensInterceptor(). I did notice that the SuperTokensInterceptor() step is not added to the ThirdPartyPasswordless recipe set up steps on your website so that might be nice to add in the future 🙂 Thank you for you help!
r
Oh yea. It’s mentioned in the handling session tokens section
But I’m glad you got it working 🙂
6 Views