Answer the question
In order to leave comments, you need to log in
How to make a public API based on a private one?
The server has an API implemented according to the classical scheme: /users/ID
. Those. there is a certain private API in which a lot of things are implemented, on its basis I would like to make a public API with limited capabilities.
How to get the data of this user from a third-party application in which the user is logged in? Make requests of the form /users/ID
and /users/ID/payments
or, /profile
in /profile/payments
fact, just proxying them to the main API?
Answer the question
In order to leave comments, you need to log in
Just write a proxy-layer in which everything that is needed is added (authorization, etc.) and everything that is not needed is removed (some internal things are filtered out in the output).
Such an api-proxy is written very easily and quickly in any language and does not even require any frameworks. The last such implementation took me about 900 lines in 4 files.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question