At the company I'm working for we're building a system that needs to allow for API calls from the users website.
This is what I have thought so far:
The user register their website with our system.
The system generates a token that will be put in a file on the user server (or something similar) in order to verify that the website is owned by the user.
The user presses a verify button that will make our system check that the token is present at the predefined location.
If the token matches with the one saved in our database the website is verified and the server informations such as IP and domain name are saved in the database in order to allow the requests to the system API.
What are the alternatives in order to allow API calls from the user's website in an easy way for the user? Anything that can be done to improve and secure this flow?
The workflow we ended up using is the following:
Hope that this may come in handy to other people to.