Does the Wappler backend provide a connection API for third-party apps?

Friends, I would like to know if I can develop a backend in Wapller to make it available to third-party tools.
How would this connection take place, via REST?
Is there examples or documentation for this use case?
I searched the forum, but I didn’t find anything conclusive, thanks for your attention.

Hi @dev_fun. Welcome to the community!

I’m not entirely sure I’m understanding your question but Wappler can be used to create a backend where data is passed to and from it as JSON. Wappler has two distinct parts - App Connect (the client-side frontend) and Server Connect (the server-side API backend) and they work beautifully together but can be split.

For example, to create a mobile app you would have a project set up purely for the backend API Server Connect part which delivers the data to the mobile app. So it sounds like this is what you’re looking for?

Server Connect handles the security, database connections, queries, SCRUD, etc. and you build it using very easy flows with conditional logic, calculations, format conversions, etc.

I hope all this helps.

1 Like

Yes you can, as @sitestreet explained the backend provides a JSON output. So each server action is and API endpoint that you can connect to, using its URL.

1 Like

Thanks for the answers.
I was happy to get positive feedback on this issue.
I would need help to know how to make the requests, how to pass the parameters, etc.
Is there documentation or tutorials on this?

A very good place to start is the YouTube channel here:
https://www.youtube.com/@Wapplerio

I know the channel; I had already looked for it before asking here, but I didn’t find anything in it regarding my question.

Hello and welcome!
You can also check the official docs
https://community.wappler.io/c/docs/28

If you got some issues, you can always come back here, this a great community and it will always help you out.

1 Like

Every tutorial that teaches you how to make a form indirectly teaches what you want. The difference you’re only interested in the Server Action part (not Server Connect)

You are wrong, looking at the forms it is not possible to know the necessary headers, for example, connection method (GET, POST, …), the data would be passed in the request body or as a URL.
If I need to authenticate, how is the call processed? What is the method to create a user?
I’ve been looking for these things for some time and carrying out tests in the dark, but I haven’t been able to make any progress.

Hi @dev_fun, you are looking to create an “API server”. The default way Wappler allows third-party apps to connect to the “API Server” is with normal credentials (i.e. username/password). This probably isn’t what you want as a best practice as it’s normally used for users visiting your site. I’m not sure what the best solution is, but there was a similar discussion a few months ago.

What Apple was saying is that the Server Connect “Server Actions” are APIs. You can connect to them using REST. You would create whatever APIs you need (e.g. register user, login, etc.) typically starting with one to create a user via POST.

Here’s an example API for registering a user.

Here’s an example for logging in a user.

image

Here’s one that gets the details about the logged in user.
image

Here’s one that gets details about all users.

All of these live in the Server project and can be called via REST methods.

5 Likes

Dude, thank you so much!
I haven’t yet discovered whether there are headers involved in the request and what they would be, but I’ve already managed to understand some things.

1 Like

By default it uses cookies :slight_smile:

But if you’re only building a back-end you can use any headers you want, you’re in charge what method you use, Wappler isn’t going to restrict you. I think you can access the $_HEADER variable

In my previous message, I meant that if you build a form, you can use the browser’s developer tools to see the network requests, and therefore see how the API requests are performed. Forms in Wappler are API calls

1 Like