App42 create user in unity

0 votes

Hi, 

I'm totally new in this, anyway I have downloaded th sample file for unity and I have passed the API key and secret key in constant file. 
 
when I run the file in the unity editor I got many buttons, I tried to click (create user) but I got this error

 

App42Exception: EmailAddress is Not Valid
com.shephertz.app42.paas.sdk.csharp.util.Util.ThrowExceptionIfEmailNotValid (System.Object obj, System.String name)
com.shephertz.app42.paas.sdk.csharp.user.UserService.CreateUser (System.String uName, System.String pwd, System.String emailAddress, App42CallBack callBack)
UserTest.OnGUI () (at Assets/scripts/UserTest.cs:49)
 
 

 

asked Aug 20, 2015 in App42 Cloud API-BaaS by Sayed Mahdi Al-mousa (10 points)

1 Answer

0 votes

Hello Sayed,

Thanks for sharing the error message with us. Kindly put the correct emailid & username in Constant.cs file to use this method because at present it is "<EmailId of The User>".

Please update this values and run your unity project to overcome on this issue. 

Thanks,

Himanshu Sharma

answered Aug 20, 2015 by hs00105 (2,005 points)
thank you for replying to me, as I said before I'm totally new in this so please bear with me.
you mean I have to go to constant.cs script file and change this

public string emailId  = "<put my email here>";                // EmailId for the user creation

and this should work without error. well I tried this and I still gets the same error.
Do you know where can I find a sample file to create a user that contain three input field to put an email, user and password and a button to create a user. I want a sample unity file that contain all the code required to do that, the only thing I have to modify is the secret and API key.

I just want to know how this works, I found sample file that came with the SDK complicated. So I want a sample file that have "create user" to use it in Unity (C#).

I'm trying to create a simple 2D game in unity that required the user to create an account (username, email, password), but I didn't find enough tutorials and instructions to do that. I'm new in programming so please bear with me.
In your file, constants.cs change the value
public string emailid = "abc@yahoo.com" (this is just a test value) and check if it works. I am able to register user with email address that is retrieved from facebook. Can you please share the value of the that you are sending in the email address?
Hello Sayed,

This is the basic sample which we have attached along with SDK download. As of now, we have not added a complete UI sample to put the parameters values from UI. Once we add, will update this thread.

Regards,
Himanshu Sharma
Hello Najwani,

Have you got any exception? If yes, then please share the exception details. It will help me to provide better support to you.

Regards,
Himanshu Sharma
Hi Himansu, I dont have a problem or exception. Just trying to help out Sayed.
No worry Najwani, Thanks for your contribution to ShepHertz Forum.

Regards,
Himanshu Sharma
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...