Backendless Support
 
Waiting for user's response

Registration Error: "code":1011,"

Greetings,

Am getting error on user registration, REST Api.

  1. {"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

Leave a Comment

Comments (10)

photo
1

Hello

Could you provide the cURL please?

Regards, Vlad

photo
1

did you do the request without "user-token" header?

photo
1

  1. curl
  2. -H Content-Type:application/json
  3. -X POST
  4. -d '{"accountKitId":"25293659XXXXXXX", "name":"George Clooney", "email":"olak@yahoo.com", "phoneNumberString":"+251775214XXXX", "dateOfBirth":"Sat May 29 00:00:00 EDT 1976", "gender":"Female"}'
  5. -v
  6. 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

photo
1

You've set DENY permission for NotAuthenticatedUser on create a new object in Users table

feaf658605d5d2f20d8888943d0bec35

that's the reason why you can not create a new user object

photo
1

Facebook logins are going though, is that different? I was trying to provide an alternative registration option.

photo
1

Hello Vlad, i have managed to register, thank you.

photo
1

Just a note that user token was not returned, is that the normal behaviour?

George

photo
1

yeah, when you register a new user it doesn't return user-token, but when you call login api it does.

photo
1

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?

photo
1

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

photo