PHP API Changes and modifycation

Job ID: 37758298

Budget: €250 – €750 EUR

Hello.

I have an API up and running, and that API is a service which users get access to, the API has JSON values given for everyone to use that has access to the API.

The values inside of that JSON are for example:
https://any-url-or-domain.com/foldername/X.filetype

And along with that information you get tokens that you use to be able to access that file.

Do to that, many people are accessing the API and then sharing the content of it everywhere on the internet, and where we are providing content from third party services we cannot protect the content in the JSON .

So we would like to secure it more for example, when user has access to our API he has an API key, and we would like to mask our content in our JSON with some kind of PHP manipulation

So let's say, we have JSON which has original URL of like this example:
https://any-url-or-domain.com/foldername/X.filetype and the token is AbXdSss600555 and that token is not related to the API in any stage.

We would like to change it that way:
https://api.ourdomain.com/secure.php?id=22/PathID/ID.filetype and instead of the "AbXdSss600555" that person would use their API key which is for example: "be63c8bc9bc450fb856b02e1dcf5a885c89c5089c0"

and if the https://api.ourdomain.com/secure.php?id=22/PathID/ID.filetype request with the OK with their API key = be63c8bc9bc450fb856b02e1dcf5a885c89c5089c0

Behind the seance some work of process will allow them to use the original file, and the correct tokens without exposing the real URL, or Token.
Related categories: PHP JavaScript XML Software Architecture MySQL