API server Side Calls - can this be done in WF?

Hi Guys,

Non-techy here but I understand a little bit so please be kind. We are building a new website that requires API server-side calls to a separate database. I want to know if this is possible to do, I know it is in Wordpress but I hate WP and want to build on Webflow as I am a design-centric type of guy :slight_smile:

Is this possible to do yet within Webflow?

Thanks in advance

At a high level it will need to do the following:

  • WF application directs the browser to the DB authorization page.
  • The user authenticates and approves WF application’s request.
  • The user is redirected back to WF with an authorization code in the query string.
  • WF sends this code to the DB to exchange for an API access token and optionally a refresh token.
  • WF application can now use these tokens to call the DB API on behalf of the user.

bump any help would bee great or a point in the right direction to the right link - thanks in advance

Also interested in this

What you’re describing here is accomplished by an OAuth flow. You’ve probably seen this sort of thing with Google or Facebook where the user is directed to sign in and approve access to features X, Y, Z.

If your server implements OAuth, then it’s possible to implement the other side of that in Webflow using Javascript. Providers like Google offer a client side library that makes consumption a lot easier. This lets you focus on your UI and functionality without mucking around with the protocol.

If there’s no client side library then you have to implement the authentication process, keep track of the token, and send the token with each request by yourself. Oh, and renew the token when it expires… all that is a part of the OAuth protocol, like what you described above. It’s probably best to pay an experienced developer for this if you’re unfamiliar yourself.

So:

  1. See if the server implements OAuth
  2. See if there is a client library that makes it easy to interact with
  3. If no to #1… Can you pay someone to implement OAuth? Or does the server implement some other protocol like password authentication? Typically you would also get a token from a successful login in this case, and would send that with further requests.
  4. If no to #2… Can you use something general purpose like this? Can you pay someone to implement a library? Or read the server documentation and do it yourself?

In short it depends on what your server is providing to you. You will need to play ball with whatever approach is supported.