Best answer

Custom Integration

  • 7 July 2020
  • 5 replies
  • 379 views

Userlevel 1

I’m brand new to Zapier and looking into developer integrations for possible use in my company’s custom CMS software. My question is… is it even possible to develop an integration without a centrally hosted service? For example, all of our websites live on their own domain and have their own urls to login (basic email/password, sometimes 2FA), so there’s no mycompany.com/authenticate url or anything equivalent. It would all be website1.com/cms/login, website2.com/cms/login, etc.

The zap actions that I would be exposing would be the same across the board, but I’m not sure this type of setup would even work with Zapier without adding a layer on top just for authentication/communications. 

Maybe I’m thinking about this the wrong way. How does something like Wordpress do the same thing with websites (and their data) living on unique domains? Anybody have insight?

icon

Best answer by ikbelkirasan 7 July 2020, 22:57

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +12

@KorySharp - How about adding the website URL as an authentication field? This way, you will be able to use it as a base URL for all the HTTP requests. For example: {{bundle.authData.apiURL}}/cms/login

Userlevel 1

@ikbelkirasan Thanks for the response. So I’m currently looking at this screen in the basic auth setup. The API endpoint url it’s asking for appears to require an absolute url. Can I use custom authentication fields in that endpoint?

 

Userlevel 7
Badge +12

@KorySharp - So, I checked the Basic Authentication setup page and didn’t find a way to add extra input fields. In this case, you can use API Key authentication instead. However, you’ll have to construct the Basic Auth header yourself. You can use my example below as a reference. Good luck!

 

Userlevel 1

@ikbelkirasan I was actually reading into that as your message popped up. Gonna go with that! Thanks again.

Userlevel 7
Badge +12

@KorySharp - Just wanted to fix something in the screenshot above. I forgot to convert basicAuth to base64. Here’s how to do it:

const basicAuth = Buffer.from(
`${bundle.inputData.username}:${bundle.inputData.password}`
).toString("base64");