Greetings,
Am getting error on user registration, REST Api.
{"code":1011,"message":"User has no permission to create entity","errorData":{}}
My Request Body does not have the “password” property(user authentication is done elsewhere) and am trying to put something in the “socialAccount” column of the Users table with it.
App ID 850D233C-6AC2-244C-FFC5-ED60D85BFB00.
Regards,
George
Hello
Could you provide the cURL please?
Regards, Vlad
did you do the request without “user-token” header?
curl
-H Content-Type:application/json
-X POST
-d '{"accountKitId":"25293659XXXXXXX", "name":"George Clooney", "email":"olak@yahoo.com", "phoneNumberString":"+251775214XXXX", "dateOfBirth":"Sat May 29 00:00:00 EDT 1976", "gender":"Female"}'
-v
https://api.backendless.com/application-id/rest-api-key/users/register
It’s a new user registration, am expecting the token upon succesful registration. The header just contains “Content-Type”, “application/json”
Regards,
George
You’ve set DENY permission for NotAuthenticatedUser on create a new object in Users table
http://support.backendless.com/public/attachments/feaf658605d5d2f20d8888943d0bec35.png</img>
that’s the reason why you can not create a new user object
Facebook logins are going though, is that different? I was trying to provide an alternative registration option.
Hello Vlad, i have managed to register, thank you.
Just a note that user token was not returned, is that the normal behaviour?
George
yeah, when you register a new user it doesn’t return user-token, but when you call login api it does.
That means i have to in the background call login api with the identity and password used by the user to register before taking them to the homescreen if i don’t want to prompt them for a login immediately after registration. The user token is the bedrock of managing user sessions, right?
Yes, you are right.
You have a full control to register/login user. If you don’t want to login user right after registration just don’t do that. Otherwise just wait “registration” response and do “login” request.
According to your second question - yes. Take a look on the docs https://backendless.com/docs/rest/doc.html#maintaining-user-session