<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=API_key</id>
	<title>API key - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=API_key"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=API_key&amp;action=history"/>
	<updated>2026-10-25T23:21:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=API_key&amp;diff=8160631&amp;oldid=prev</id>
		<title>imported&gt;Frap: /* Usage */</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=API_key&amp;diff=8160631&amp;oldid=prev"/>
		<updated>2025-06-11T23:59:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Usage&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Identifier for authenticating with an API}}&lt;br /&gt;
{{more citations needed|date=October 2018}}&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;application programming interface&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;API&amp;#039;&amp;#039;&amp;#039;) &amp;#039;&amp;#039;&amp;#039;key&amp;#039;&amp;#039;&amp;#039; is a secret unique identifier used to [[Authentication|authenticate]] and [[Authorization|authorize]] a user, developer, or calling program to an [[Application programming interface|API]].&amp;lt;ref name=&amp;quot;:0&amp;quot;&amp;gt;{{Cite web|url=https://blog.rapidapi.com/api-glossary/api-key/|title=API Key - What is an API Key?|website=Last Call - RapidAPI Blog|language=en-US|access-date=2019-09-20}}&amp;lt;/ref&amp;gt;&amp;lt;ref name=&amp;quot;:3&amp;quot;&amp;gt;{{Cite conference |last=Lu |first=HongQian 2014 |title=Keeping Your API Keys in a Safe |url=https://ieeexplore.ieee.org/document/6973849 |conference=IEEE 7th International Conference on Cloud Computing |doi=10.1109/CLOUD.2014.143 |via=IEEE Xplore|url-access=subscription }}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Cloud computing]] providers such as [[Google Cloud Platform]] and [[Amazon Web Services]] recommend that API keys only be used to authenticate projects, rather than human users.&amp;lt;ref&amp;gt;{{Cite web |title=What is an API Key? - API Keys and Tokens Explained - AWS |url=https://aws.amazon.com/what-is/api-key/ |access-date=2024-09-01 |website=Amazon Web Services, Inc. |language=en-US}}&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;{{Cite web |title=Why and when to use API keys {{!}} Cloud Endpoints with OpenAPI |url=https://cloud.google.com/endpoints/docs/openapi/when-why-api-key |access-date=2024-09-01 |website=Google Cloud |language=en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
&lt;br /&gt;
=== HTTP APIs ===&lt;br /&gt;
API keys for [[HTTP]]-based APIs can be sent in multiple ways:&amp;lt;ref name=&amp;quot;:2&amp;quot;&amp;gt;{{Cite web|url=https://swagger.io/docs/specification/authentication/api-keys/|title=API Keys|last=|first=|date=|website=|url-status=live|archive-url=https://web.archive.org/web/20191017214615/https://swagger.io/docs/specification/authentication/api-keys/ |archive-date=2019-10-17 |access-date=}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [[access token]] is often a [[JSON Web Token]] (JWT) in the HTTP Authorization header:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /something HTTP/1.1&lt;br /&gt;
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the [[query string]]:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
POST /something?api_key=abcdef12345 HTTP/1.1&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a [[HTTP request header field|request header]]:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
GET /something HTTP/1.1&lt;br /&gt;
X-API-Key: abcdef12345&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As a [[HTTP cookie|cookie]]:&amp;lt;syntaxhighlight lang=&amp;quot;http&amp;quot;&amp;gt;&lt;br /&gt;
GET /something HTTP/1.1&lt;br /&gt;
Cookie: X-API-KEY=abcdef12345&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Security ==&lt;br /&gt;
API keys are generally not considered secure; they are typically accessible to [[Client (computing)|clients]], making it easy for someone to steal an API key. Keys often have no expiration, meaning a stolen key can be used indefinitely unless revoked or regenerated.&amp;lt;ref name=&amp;quot;:1&amp;quot;&amp;gt;{{Cite web |title=Why and when to use API keys {{!}} Cloud Endpoints with OpenAPI |url=https://cloud.google.com/endpoints/docs/openapi/when-why-api-key |access-date=2019-09-20 |website=Google Cloud |language=en}}&amp;lt;/ref&amp;gt; Keys are supposed to be a secret known only by the client and [[Server (computing)|server]], so they should not be communicated over an [[insecure channel]] and can only be considered secure when used in conjunction with other security mechanisms such as [[HTTPS]].&amp;lt;ref name=&amp;quot;:2&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are several risk scenarios when using API keys:&lt;br /&gt;
&lt;br /&gt;
* Developers may write [[Scripting language|scripts]] that contain keys in [[plaintext]].&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&lt;br /&gt;
* Developers may [[Hard coding|hard-code]] keys into [[source code]], and forget that when they release the code.&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&lt;br /&gt;
* Having unprotected keys in [[Mobile app|mobile apps]] is dangerous.&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
These risks generally stem from the key being in plaintext, which is potentially accessible to adversaries.&amp;lt;ref name=&amp;quot;:3&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Incidents ==&lt;br /&gt;
In 2017, Fallible, a Delaware-based security firm examined 16,000 [[Android (operating system)|Android]] apps and identified over 300 which contained hard-coded API keys for services like [[Dropbox]], [[Twitter]], and [[Slack (software)|Slack]].&amp;lt;ref&amp;gt;{{Cite web |title=Hundreds of popular Android apps contain hard-coded secret keys |url=https://www.zdnet.com/article/secret-tokens-found-hard-coded-in-hundreds-of-android-apps/ |access-date=2022-06-20 |website=[[ZDNet]] |language=en}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
{{reflist}}&lt;br /&gt;
&lt;br /&gt;
=== Book sources ===&lt;br /&gt;
* {{Cite book |last=De |first=Brajesh |url=https://www.worldcat.org/oclc/978273106 |title=API management: an architect&amp;#039;s guide to developing and managing APIs for your organization |publisher=[[Apress]] |year=2017 |isbn=978-1-4842-1305-6 |edition=1st |location=New York |oclc=978273106}}&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
* [https://cloud.google.com/endpoints/docs/openapi/when-why-api-key Why and When to Use API Keys]&lt;br /&gt;
&lt;br /&gt;
[[Category:Application programming interfaces]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{compu-prog-stub}}&lt;/div&gt;</summary>
		<author><name>imported&gt;Frap</name></author>
	</entry>
</feed>