0

HTML page has a submit button. On clicking the button, the 4 APIs has to be called. All the 4 APIs are linked to each other.

For instance, the first API is used to get the access token. And the token is passed in the second API to process the GET request.

I am new to REST APIs and not sure whether it's easy to call via HTML or better way by using PHP.

Rit
  • 1
  • 2

1 Answers1

0

You want to use, not to implement API.

You should decide first on which side (server or client) it should be implemented.

On server side you do requests on your behalf. You are responsible for them. They are done from your IP address. But you can hide API address from client, you can cache response or control this process somehow. Use PHP cURL extensions for that.

On client side, requests is performed by end user, from his IP. Read How to enable cross-domain request on the server? to learn about requests to different domains. Search for AJAX. Probably, use some library like jQuery to write less code.

Community
  • 1
  • 1
George Sovetov
  • 4,942
  • 5
  • 36
  • 57