I am fairly new to all this so I might have some basic things wrong.
However, I am trying to implement a reset password functionality based on a backendless tutorial. It is working in backendless when I “Invoke” but in my app it always returns a 3064 error. I have console logs to watch the value of the user-token saved in my app and they are consistent and don’t change once logged in. i.e. the user-token provided by backendless api when logging in doesn’t change.
The strange thing is that when I login to impersonate a user in backendless and use that user-token in my app it works. But the one the original login gives me in the app has expired. For context, I am going straight from a login to a change password so it hasn’t expired from time, I even turned off that functionality in backendless to see if it would help.
The 3064 error seems common with many threads without an answer so I have made a new one.
Hi Neil,
Welcome to the Backendless community!
Could you please provide more details? Such as whether you are testing with a page created with UI Builder. Do you have a link for the page and a set of test credentials that demonstrate the issue? Having access to this information would help us diagnose the problem.
Regards,
Mark
Hi Mark,
Thanks for the quick response!
I have no test pages in backendless. (is this worth doing?)
I am using draftbit as my frontend and an API service in cloudcode in backendless to take the request.
Thanks
Do you have a URL for the draftbit page we can try to see the issue?
This is the URL: Draftbit
I don’t know if you can access it though.
Unfortunately, I cannot access it - it requires a login to your draftbit account. Is there a way to publish that page so it is accessible publicly?
I don’t think there is. However I can share the whole app?
I don’t think that the issue is in the app (though I could be wrong). This is because I was able to do a password change using the user-token from the backendless impersonate login. But the user-token given from the API in the app from backendless returns a 3064 error.
Is it possible that backendless API is providing an incorrect user-token when requested via API?
No, this would breaks tens of thousands of apps powered by the platform. Have you checked that the app sends the same user-token that was returned by Backendless in the Login API
response?
Here are the console logs from a login then a change password request in my app.
Please share the following:
- Login API request HTTP headers
- Login API response body
- Failing request HTTP headers for both request and response.
-
In draftbit you add headers in an interface. I only have Accept: application/json & Content-Type application/json. I am then extracting the user-token from the response and setting a variable as that value.
-
▼lastLogin:1689668768461
userStatus:“ENABLED”
created:1689604282734
accountType:“BACKENDLESS”
admin:true
ownerId:“21F3012D-08F7-4BC4-81B9-7287EE96E5C0”
socialAccount:“BACKENDLESS”
oAuthIdentities:null
name:“Admin”
___class:“Users”
blUserLocale:“en”
user-token:“B06095F1-3F32-4956-956E-C8B40EEF2189”
updated:1689605712188
objectId:“21F3012D-08F7-4BC4-81B9-7287EE96E5C0”
username:“Admin”
-
Headers for password request: Accept: application/json, Content-Type: application/json, user-token: USER_TOKEN (Global Variable)
Response: code:3064
message:“Not existing user token - B06095F1-3F32-4956-956E-C8B40EEF2189. Relogin user to update your user token”
errorData:{}
Let me know if that’s what you needed.
Thanks
Hello @Neil_Hazzard
Pls, open the terminal in the browser (F12) go to the network tab and copy cURL from your request.
(edit user-token because it is sensitive information. Do not provide it there)
Regards