Problems with applySessionToken function

When I try to call “wixUsers.applySessionToken” function this error appears

POST https://{site_URL}/_api/wix-sm-webapp/tokens/verify/52c18bf9-a99e-4f16-998b-ae4ef253bf54/bff11502-6470-454e-9d6c-4e0560823692 400 (Bad Request)

What does that mean? Problems with Corvid or my bug?

Here are the steps:

  1. Register user with backend code “wixUsers.register(email, pwd)”

  2. Approve this user with backend code “wixUsers.approveByToken(registration.approvalToken)”
    Wix creates and approves new user. Everything is fine.

  3. Log in this user (client-side code) with “wixUsers.applySessionToken(results.sessionToken)” → Wix throws the above error.

1 Like

The 400 Bad Request Error is an HTTP response status code that indicates that the server was unable to process the request sent by the client due to invalid parameter/syntax somewhere in your code.