USER ROOKIE: Login user with API

Mission: USER ROOKIE
Task: Login user with API

Can’t seem to login the user using Appgyver’s Composer. Not sure what I’m understanding wrongly from this doc: https://backendless.com/docs/rest/users_login.html

I’m using the REST API.

This is the error:

Error: JSON error response from server: {"code":8002,"message":"Could not parse request with message: , status code 404, headers POST /FDD131B6-4E4C-69F9-FFEC-6FAD74387800/38980140-DD76-45D2-AC83-26ACBF301823/data/Users/login","errorData":{}}.status: 404


Resource settings for Create record (POST)
-------------------
Resource URL: https://api.backendless.com/FDD131B6-4E4C-69F9-FFEC-6FAD74387800/38980140-DD76-45D2-AC83-26ACBF301823/data/Users/login
Relative path: 

I’m using https://api.backendless.com/application-id/REST-api-key/users/login as the base URL

And I tried using “login” and “email” as the schema on top of the required “password”.

Any help greatly appreciated!

Hello @Peculiar_Yogi

You use curl or Postman or something else for send request?
Your request is POST?
You added Request Headers - Content-Type:application/json?

Hey Vladimir,

I’m using Appgyver’s platform to do it. It’s using REST API.

Yes, my request is POST, and I’ve added the request headers.

@Peculiar_Yogi

I’m not yet familiar with the Appgyver’s Composer, please make a screenshot of how it looks, how the request body is installed there.

This is a browser program, isn’t it? See what exactly comes with Use the built in tools or available plugins for any browser out there, like Firebug for Firefox or Chrome’s developer tools. Each have a network tab that you can use to see all GET / POST requests and responses to any type of resource. See for Chrome.

Hey Vladimir, I tried it in Postman too, but still failed… I’m very sure I’m doing something wrong somewhere :frowning:


I should declare that I have no knowledge in JSON, just following the Missions and documentations…

The problem is right here:

Hey Mark, I just figured that out too…

My mistake to blindly copy what’s here: Backendless Login API - Backendless REST API Documentation

Side note: I’m taking up Udemy courses for coding :joy:

Thanks!

I’m also looking into integrating backendless with composer. Could you share your progress?

Sure, I’m still exploring Backendless, going through the missions to understand a bit more about the platform. Will share more at a later stage.

Seems that there aren’t any tutorials of using Backendless and Appgyver, despite the fact that both platforms should work well with each other.

1 Like

We don’t have a PHP SDK, so composer isn’t supported either. But you can always use REST API with any of supported language.

Regards, Dima

1 Like

Hey Dima, Appgyver’s Composer Pro uses REST, though. So I think we’re good.

And actually, some users on Appgyver’s forums recommend Backendless with Appgyver’s Composer Pro.

Btw, on REST API - I noticed there isn’t a PATCH option in the Backendless Console. Can’t seem to find anyone mentioning this on the forums either.

Can I just confirm that we can use PATCH instead of PUT to update data in the Backendless DB? For eg. if we want to update 1-2 properties of a specific user instead of having to input 10, 20 or 30 properties that are required in a PUT request.

Sorry if I’m getting it wrong, and thanks in advance :slight_smile:

Our PUT method works like a PATCH, and you don’t need to worry about optimization of this process.

Regards, Dima.

1 Like

Oh great, thanks for confirming. That’s a relief!

I was able to post a record using Appgyver.
I was also able to retrieve the array of data.
But for some reason I cannot access an individual property. It seems to be rejecting the relative path.
When I try to retrieve the record Object ID, this is the error I receive.

!

Using API generation tool gives a slightly different response. Still failed to fetch.
No problems with Postman or Swagger.

If it works in Postman and Swagger (and I am sure it works in Backendless’ own REST Console), wouldn’t it point in the direction of Appgyver? Have you tried approaching their support?

Yes, I was able to get it working today. And everything is running well. I will try to write a short tutorial in the next week or two, so that other appgyver users who have no coding skills can use backendless as their backend. I think backendless is a good option for appgyver users. More powerful than bubble.