Possible reasons for error code 1400 bad request, Request parameters invalid on user authentication.

0 votes

Hi folks!  I'm just getting started and am having trouble with user authentication.  It seems pretty straightforward but I am getting 1400 bad request errors when trying to authenticate.  What could cause that? 

I'm not getting any error messages in Unity.  I'm just calling this method:  userService.Authenticate(usernamepassword,new UnityCallBack());

And the callback comes back with 1400 bad request, Request parameters invalid.  username is a string; same with password.  I'm entering in the correct username and passwords and the user does exist in the database.  Besides I think if those were the problems I would be getting different error codes based on what I saw in the documentation.  What usually causes the 1400 bad request when doing user authentication?

asked Apr 9, 2014 in App42 Cloud API-BaaS by Rhinosaurus (32 points)

1 Answer

0 votes

Well I believe I found the problem but I am a little confused.  When I build my UserService, I was using App42API.BuildUserService();

But I had created an api using new ServiceAPI.  Instead of that, I just set my api key and secret key on App42API and it works now.  But which way are we supposed to do it?  When I first noticed the problem I build my UserService using the api I created with new ServiceAPI, but I got complaints in Unity regarding threading when I tried to run it.

answered Apr 9, 2014 by Rhinosaurus (32 points)
There are two ways of doing it.
App42API.initialize("APIKEY","SECRETKEY") and then App42API.BuildUserService();

OR
ServiceAPI sp = new ServiceAPI("APIKEY","SECRETKEY");
sp.BuildUserService();

You can use any one however from usability point of view first one is recommended.
Thank you, that makes sense.
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
...