Create a PHP API

Hello,
I’m new with Monday API. I created an API with quickstart-react. My team is not familiar with React and we’d like to create an API with PHP instead. We’ve tried following the steps in https://support.monday.com/hc/en-us/articles/360013465659-API-Quickstart-Tutorial-PHP but if I understand well, this is for creating external applications ? How can we build an API with our PHP code ? We want a widget in monday with our specific code.
Thank you in advance.

1 Like

Hey @ldamiani :wave:

My warmest welcome to the community! Thank you for giving our monday.app framework a shot :slight_smile:

I can confirm that our API Quickstart tutorials are geared more towards building an integration with monday.com and using the API, rather than using the SDK and PHP to build your own app, like a board view.

Perhaps some of our community experts can shed a bit more light on their process here and if they have successfully used PHP to build a board view. That said, is there anything in particular you ar having issues with so far? I’d love to understand how we can best assist.

-Alex

HI @ldamiani

While I am coding Integrations in php, I believe that a view has to be coded in JS.

Views are loaded as Iframe in the browser so PHP should not be possible anyway.

That being said, you can absolutely code a View without using React.
Standard JS will be fine, if you want to stay as close as possible of PHP language.
Any JS framework will work if you are more familiar with one (I use Vue.js).

It is also easier to begin coding a View instead of an integration, as monday.sdk helps a great deal.

The hardest for me when I began was to make my first queries work.
Using the Api playground first helps.
Then in your code, run your first query with constants, and then it works replace them with variables.
(variables will avoid the need of escaping quotes, which is really bothersome as it can cause parsing errors).

Hope this help,
Laurent

2 Likes

Thank you for your answers :slight_smile:
I’ll try and see with a js framework then.
API playground helps really a lot for the queries.
Thanks again.

1 Like

Thanks so much for your insight here, @LaurentConroux! I really appreciate it.

@ldamiani Amazing, I’m glad this topic was a step in the right direction. I hope your development goes smoothly :slight_smile: Happy coding!

-Alex

To add on to what Laurent said, PHP is a server-side technology but you can use server-side rendering. Essentially you’d generate the HTML/CSS/JS code on your server and then send it to the client to view/interact with.

Either way though, since the view will be running in a browser, your code will eventually need to compile into JS/HTML/CSS so that the user can interact with it on the frontend. So it might be simpler/more comfortable for you to just use vanilla JS :slight_smile:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.