There are 2 websites. Mine and a clients. The client needs to be able to invoke a JS that calls my JS which returns something back to the client. When i get the call from the client i need to verify their account info as well. So i’ve been asked to create the API for these 2 functions and i’m pretty new to web development. Any help is much appreciated. Thanks.
Share
Well, you’re asking quite a bit there (although very little in detail).
You want to look into a REST API which handles at minimum GET and POST. It should return JSON data.
Then you can use AJAX calls from the client’s site to your API (not sure why you think you have to have JS on your site, that requirement isn’t clear).
As mentioned, calling JS across sites presents security risks, so you have to use JSONP.
You’ll get better answers from this site when you ask more specific questions.