Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set up an API key system for your website? [closed]

Tags:

api-design

Let say that I have a website with some information that could be access externally. Those information need to be only change by the respected client. Example: Google Analytic or WordPress API key. How can I create a system that work like that (no matter the programming language)?

like image 269
Patrick Desjardins Avatar asked Sep 16 '08 21:09

Patrick Desjardins


People also ask

How do I activate my API key?

Go to the Google Maps Platform > Credentials page. On the Credentials page, click Create credentials > API key. The API key created dialog displays your newly created API key. Click Close.

How do I Create a REST API key?

Logging in to Maximo using Postman and Basic authorization header: In Postman, click the Authorization button, and select "Basic Auth". Set the username and password associated with a valid Maximo user. The above will create one api key for the logged in user which will never expire.

Do I need an API key for my website?

The API key is a unique identifier that authenticates requests associated with your project for usage and billing purposes. You must have at least one API key associated with your project.


2 Answers

A number of smart people are working on a standard, and it's called OAuth. It already has a number of sample implementations, so it's pretty easy to get started.

like image 54
Aeon Avatar answered Jan 01 '23 05:01

Aeon


Simple:

  1. Generate a key for each user
  2. Deny access for each request without this key
like image 34
Nikolai Prokoschenko Avatar answered Jan 01 '23 07:01

Nikolai Prokoschenko