2 / 5
Jul 2023

I’m trying to verify the user token via my server, the android app sends the token to the server after retrieving it from:

realmApp.currentUser.accessToken

in the server I get the token to access to the admin api adding in the body the public and private key of organization owner (added to the project) by

https://realm.mongodb.com/api/admin/v3.0/auth/providers/mongodb-cloud/login

then ask to admin api, adding the bearer token got in previous step to the header and the token of the user in the body of request

https://realm.mongodb.com/api/admin/v3.0/groups/$realmProjectId/apps/$realmAppId/users/verify_token

I always get this response: 404 {“error”:“user not found”}

The client app is an android app using realm sdk in kotlin version 1.9.1 and the server is a ktor server.

Thanks to anyone who can help me

Hi, thanks for you reply.
I have solved the issue checking the body content, that just was the wrong token.

Thank you for your help

1 year later

For anyone who finds this thread in the future.

Our team had the same issue: we were using GET as the HTTP method, but this API is a POST method