I want to create a secure REST API
If I see the Google API, for example, the KEY API is generated based on the domain.
I got two questions from this:
First, is it true / right using a one-way hash? If so, how, if someone knows the hash method and domain, so he can generate the api key and use it. and what is the hash method / function that I can use?
Secondly, as a client makes a desktop application, how can he generate an API key, access to which from the desktop, now a website with a domain URL. I mean, they can generate an api key because they don't have a url.
Is there a good way? How to create a secure api and how to create an api key?
btw i'm using php
source share