{"id":6408,"date":"2020-01-06T12:45:14","date_gmt":"2020-01-06T17:45:14","guid":{"rendered":"http:\/\/allidm.com\/blog\/?p=6408"},"modified":"2020-01-06T12:48:40","modified_gmt":"2020-01-06T17:48:40","slug":"the-three-most-common-api-authentication-methods","status":"publish","type":"post","link":"https:\/\/allidm.com\/blog\/the-three-most-common-api-authentication-methods\/","title":{"rendered":"The three most common API authentication methods"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">As you begin working with third-party APIs, you&#8217;ll run into a variety\n of API authentication methods. The three most common methods to perform\n authenticated requests with an API are:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li> <strong>Basic authentication:<\/strong> You send your username\/password alongside every API call ????<\/li><li> <strong>API Key:<\/strong> The service creates a unique key for your account and you pass it alongside every request ? <\/li><li> <strong>OAuth:<\/strong> A user clicks on a sign-in button, grants permission, and your app can authenticate each request with an <code>access_token<\/code> ?<\/li><\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Each method has its own pros\/cons. <\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\n<strong>Basic<\/strong> is very easy to implement, but would you give your Google account password to someone? (You shouldn&#8217;t!)<\/li><li>\n<strong>API Key<\/strong> is as easy to implement, both for the API \nprovider and the developer. But have you ever tried to ask a non-techie \nto give you its API key?<\/li><li>\n<strong>OAuth<\/strong> (especially OAuth2.0) is the best in terms of user experience. Your users click on a button and that&#8217;s it. But for developers, <a href=\"https:\/\/dev.to\/risafj\/beginner-s-guide-to-oauth-understanding-access-tokens-and-authorization-codes-2988\">implementing an OAuth dance can be tricky<\/a>!<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Read more at <a href=\"https:\/\/dev.to\/bearer\/the-three-most-common-api-authentication-methods-2mnm\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"The three most common API authentication methods (opens in a new tab)\">The three most common API authentication methods<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>As you begin working with third-party APIs, you&#8217;ll run into a variety of API authentication methods. The three most common methods to perform authenticated requests with an API are: Basic authentication: You send your username\/password alongside every API call ???? API Key: The service creates a unique key for your account and you pass it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6019,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[210,1900],"tags":[209,57,601],"class_list":["post-6408","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-2","category-identity-manager","tag-api","tag-authentication","tag-oauth"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/allidm.com\/blog\/wp-content\/uploads\/2018\/02\/Identity_and_Access_Management_Post.png?fit=141%2C124&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p25vfy-1Fm","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/6408","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/comments?post=6408"}],"version-history":[{"count":1,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/6408\/revisions"}],"predecessor-version":[{"id":6409,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/posts\/6408\/revisions\/6409"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/media\/6019"}],"wp:attachment":[{"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/media?parent=6408"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/categories?post=6408"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/allidm.com\/blog\/wp-json\/wp\/v2\/tags?post=6408"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}