Doug Black
Posts: 0
Joined: Wed Aug 14, 2013 11:36 am

Specific User Details Not Working

I've created a service to query a Users details. No matter what I do, it just keeps giving me a 405 error or a 400 error.

Image

Image

Image

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Specific User Details Not Working

Hi, we'll test and let you know.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Specific User Details Not Working

It works for me.
1) Users in your service URL should start with lower case letter;
2) try to specify user's id (_id parameter) in service URL - http://docs.appery.io/documentation/b...
Image

Doug Black
Posts: 0
Joined: Wed Aug 14, 2013 11:36 am

Specific User Details Not Working

No, still doesn't work. Get the same error.

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Specific User Details Not Working

Please try to specify user id in URL as shown here http://docs.appery.io/documentation/b.... Example of URL codehttps://api.appery.io/rest/1/db/users/5000ad45e4b0452929274b9a/code

where 5000ad45e4b0452929274b9a - user's id from your DB.
Also could you clarify how do you send X-Appery-Session-Token? Do you map it to localStorage?

Doug Black
Posts: 0
Joined: Wed Aug 14, 2013 11:36 am

Specific User Details Not Working

This is what was returned. It gave a 400 error:

https://api.appery.io/rest/1/db/users...

Yes, the Session Token is in the local variable as "token"

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Specific User Details Not Working

Please check that you've set X-Appery-Database-Id in settings service.

Doug Black
Posts: 0
Joined: Wed Aug 14, 2013 11:36 am

Specific User Details Not Working

Nope, same thing!
Image

Image

Maryna Brodina
Posts: 0
Joined: Thu Apr 05, 2012 7:27 am

Specific User Details Not Working

Most likely you've added incorrect User ID. We reproduced 400 error with incorrect _id parameter value. To get more information on this error please open Chrome Developers Tool console (Network tab) and check JSON you receive from server
Image

Doug Black
Posts: 0
Joined: Wed Aug 14, 2013 11:36 am

Specific User Details Not Working

Wow...

Actually I had put a hyphen where an underscore needed to be.

Thanks for keeping me checking, and for all your assistance!

Return to “Issues”