Which platform to use for REST API? Also questions about PHP codes and extending endpoints.

Hello,

I am in the final stages of connecting SugarCRM to our website using the REST API. There seems to be a small problem using the platform. I am using the platform "base" and it seems to be causing problems, and the website logs out when I try using the REST API with our website. I tried using a custom name as specified in the documentation for platform but it's giving me "Invalid platform specified" error.  Then I found out that we need to configure it to use custom platforms.

How am I supposed to do it? I am coming across PHP code, but I don't understand where it is used.

I am also confused about how SugarCRM is used. It is only available as a web application, am I correct?

Here I am connecting my website to SugarCRM, so that the user can pull and push records to and from SugarCRM account, using the endpoints given.

Where does the PHP code come in here? What's the config file frequently mentioned? And how am I supposed to extend endpoints using PHP (told as an answer for a few other questions I had)?

Any help would be appreciated. Thanks!