{"id":4132,"date":"2022-08-25T07:09:40","date_gmt":"2022-08-25T07:09:40","guid":{"rendered":"https:\/\/ccbill.com\/kb\/?p=4132"},"modified":"2023-03-06T12:26:49","modified_gmt":"2023-03-06T12:26:49","slug":"curl-basic-auth","status":"publish","type":"post","link":"https:\/\/ccbill.com\/kb\/curl-basic-auth","title":{"rendered":"Curl Basic Auth - How Does It Work?"},"content":{"rendered":"\n<p class=\"h3\">Introduction<\/p>\n\n\n\n<p>Servers using HTTP authentication send a 401 unauthorized response if a client tries to access a protected resource. The response includes one or more <em>WWW-Authenticate<\/em> headers that indicate what authentication methods the server accepts for that resource.&nbsp;<\/p>\n\n\n\n<p>Basic Authentication (Basic Auth) is not entirely secure, but it is a fast and convenient way to implement access control for noncritical web resources.&nbsp;&nbsp;<\/p>\n\n\n\n<p>Find out how to use the <a href=\"https:\/\/phoenixnap.com\/kb\/curl-command\" target=\"_blank\" rel=\"noreferrer noopener\"><strong>curl<\/strong><\/a><strong> <\/strong>command-line utility to streamline Basic Auth requests.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"400\" src=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\" alt=\"How does curl basic auth work?\" class=\"wp-image-4133\" srcset=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png 800w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth-300x150.png 300w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth-768x384.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">What Is Basic Authentication?&nbsp;<\/h2>\n\n\n\n<p>Basic Authentication is an HTTP authentication method where the server declares that the client must submit a username and password to access a resource. The server validates the provided credentials against a database of authorized users and serves the resources.&nbsp;<\/p>\n\n\n\n<p>Basic Auth includes the following steps:&nbsp;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>A web client, for example, a browser, requests access to a protected resource.<\/li>\n\n\n\n<li>The web server returns a challenge, typically a dialog box that asks the web client to provide valid credentials.&nbsp;<\/li>\n\n\n\n<li>The client submits the username and password.&nbsp;<\/li>\n\n\n\n<li>The server authenticates the user and returns the requested resource.&nbsp;<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"800\" height=\"446\" src=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/http-basic-authentication-model.png\" alt=\"Visual representation of the HTTP basic authentication model.\" class=\"wp-image-4134\" srcset=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/http-basic-authentication-model.png 800w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/http-basic-authentication-model-300x167.png 300w, https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/http-basic-authentication-model-768x428.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<p>The client sends authentication credentials in the <em>Authorization<\/em> header field. The header field is structured as follows:&nbsp;&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The username and password are paired using a single colon (:). The username can contain any special character except for a colon.&nbsp;<\/li>\n\n\n\n<li>The username:password pair is encoded using Base64 encoding.&nbsp;<\/li>\n\n\n\n<li>The authorization method (<strong>Basic<\/strong>) and white space are inserted before the encoded string.&nbsp;<\/li>\n<\/ul>\n\n\n\n<p>For example, the username <em>Mjolnir<\/em> and password <em>Valhalla<\/em> are joined using a colon:&nbsp;<\/p>\n\n\n\n<p><strong><em>Mjolnir:Valhalla<\/em><\/strong><\/p>\n\n\n\n<p>The value is encoded using the Base64 scheme, which results in the following string:&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong><em>TWpvbG5pcjpWYWxoYWxsYTRldmVy<\/em>&nbsp;<\/strong>&nbsp;<\/p>\n\n\n\n<p>The complete <em>Authorization<\/em> header field appears as:&nbsp;<\/p>\n\n\n\n<p><strong><em>Authorization: Basic TWpvbG5pcjpWYWxoYWxsYTRldmVy<\/em><\/strong><\/p>\n\n\n\n<p>Basic Auth is ideal for preventing unintentional access from non-malicious parties, but it is not a comprehensive authentication method. It does not authenticate target servers, while the Base64 encoded text can easily be intercepted and decoded. This makes Basic Auth especially vulnerable to <a href=\"https:\/\/phoenixnap.com\/blog\/man-in-the-middle-attacks-prevention\" target=\"_blank\" rel=\"noreferrer noopener\">man-in-the-middle<\/a> and replay attacks.&nbsp;<\/p>\n\n\n\n<p>Basic Auth can be strengthened with encryption technology, like <a href=\"https:\/\/phoenixnap.com\/kb\/what-is-an-ssl-certificate\" target=\"_blank\" rel=\"noreferrer noopener\">SSL certificates<\/a>. However, that does not mean that Basic Auth is suitable for protecting critical resources.&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<p><strong>Note<\/strong>: <a href=\"https:\/\/ccbill.com\/kb\/authorization-bearer\" target=\"_blank\" rel=\"noreferrer noopener\">Bearer-token authentication<\/a> is considered a much safer authentication method, especially if working with an <a rel=\"noreferrer noopener\" href=\"https:\/\/ccbill.com\/kb\/what-is-an-api\" target=\"_blank\">API<\/a> and delicate information.&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">How to Use curl Basic Auth&nbsp;<\/h2>\n\n\n\n<p>The <strong>curl<\/strong> command line tool is used to transfer data to and from a server for resources specified as URLs, such as <a href=\"https:\/\/ccbill.com\/kb\/what-is-an-api-endpoint\" target=\"_blank\" rel=\"noreferrer noopener\">API endpoints<\/a>. Both <strong>curl<\/strong> and the <strong>libcurl<\/strong> transfer library are part of the Open Source <a rel=\"noreferrer noopener nofollow\" href=\"https:\/\/everything.curl.dev\/project\" target=\"_blank\">cURL<\/a> (client URL) project for facilitating data transfers using various network protocols.&nbsp;<\/p>\n\n\n\n<p>The most common use cases for <strong>curl <\/strong>are endpoint testing, retrieving resources, logging errors, and debugging.&nbsp;<\/p>\n\n\n\n<p>Users can communicate with <a href=\"https:\/\/phoenixnap.com\/blog\/web-server-vs-application-server\" target=\"_blank\" rel=\"noreferrer noopener\">web and application servers<\/a> by sending requests directly from the terminal or incorporating <strong>curl<\/strong> requests in an automated script.&nbsp;<\/p>\n\n\n\n<p>Basic<strong> curl<\/strong> syntax is straightforward:&nbsp;<\/p>\n\n\n\n<p><strong><em>curl [options\/URLs]<\/em><\/strong><\/p>\n\n\n\n<p>Curl has built-in support for basic HTTP authentication.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Send Credentials with -u Argument&nbsp;<\/h3>\n\n\n\n<p>Use the <strong><em>-u <\/em><\/strong>option to send Basic Auth <em>username:password<\/em> pairs:&nbsp;<\/p>\n\n\n\n<p><strong><em>curl -u username:password [URL]<\/em><\/strong><\/p>\n\n\n\n<p>The username in this example is <em>Mjolnir<\/em>, and the password <em>Valhalla<\/em>:&nbsp;<\/p>\n\n\n\n<p><strong><em>curl -u Mjolnir:Valhalla https:\/\/someurl.com\/protectedresource<\/em><\/strong>&nbsp;<\/p>\n\n\n\n<p>Curl automatically encodes the provided <em>Mjolnir:Valhalla<\/em> pair using Base64 encryption and adds the <em>Authorization: Basic [token]<\/em> HTTP header to the request:&nbsp;<\/p>\n\n\n\n<p><strong><em>Authorization: BasicTWpvbG5pcjpWYWxoYWxsYTRldmVy<\/em><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<p><strong>Note:<\/strong> If your username or password contains a special character (i.e., @,#, white space), place the credentials in single quotes.&nbsp;<\/p>\n\n\n\n<hr class=\"wp-block-separator has-text-color has-vivid-cyan-blue-color has-css-opacity has-vivid-cyan-blue-background-color has-background is-style-wide\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Test Authentication Header&nbsp;<\/h3>\n\n\n\n<p>You can use <strong>curl<\/strong> to test if a server requires HTTP authentication with the <strong>--anyauth<\/strong> option. Curl automatically tries to make an unauthenticated request and then attempts the safest available method if needed:&nbsp;&nbsp;<\/p>\n\n\n\n<p><strong><em>curl --anyauth -u Mjolnir:Valhalla https:\/\/someurl.com\/protectedresource<\/em><\/strong>&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Pass Authorization Header&nbsp;<\/h3>\n\n\n\n<p>The curl\u202f<em>-H <\/em>'<em>Authorization: Basic [token]<\/em> '\u202foption also allows users to pass Basic Auth credentials. Clients can encode the <em>username:password<\/em> pair in advance and place it into the <em>Authorization<\/em> header:&nbsp;<\/p>\n\n\n\n<p><strong><em>curl -H <\/em><\/strong>'<strong><em>Authorization: Basic TWpvbG5pcjpWYWxoYWxsYTRldmVy<\/em><\/strong>'<strong><em> https:\/\/someurl.com\/protectedresource<\/em><\/strong>&nbsp;<\/p>\n\n\n\n<p>The <strong>-H<\/strong> option passes the authorization header to curl as a custom header.&nbsp;<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Make curl Prompt for the Password&nbsp;<\/h3>\n\n\n\n<p>To make curl prompt for a password, use the <strong>-u<\/strong> option and only pass the username:&nbsp;<\/p>\n\n\n\n<p><strong><em>curl -u 'username' [URL]<\/em><\/strong>&nbsp;<\/p>\n\n\n\n<p>This request will succeed if the server allows users to access resources without a password. Otherwise, it will fail, and the user is going to be prompted to enter their password.&nbsp;<\/p>\n\n\n\n<p class=\"h3\">Conclusion<\/p>\n\n\n\n<p>You know how basic authentication works and how to use curl to send authorization headers for different use cases.&nbsp;<\/p>\n\n\n\n<p>Web resources that deliver sensitive information should not use Basic Auth as an authentication method. Payment APIs and other web services that deal with sensitive and personally identifiable information use bearer tokens and <a href=\"https:\/\/ccbill.com\/kb\/what-is-oauth\" target=\"_blank\" rel=\"noreferrer noopener\">OAuth authentication<\/a> to secure data transfers.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This guide explains what curl basic authentication is, how it works, and how to use it<\/p>\n","protected":false},"author":6,"featured_media":4133,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14],"tags":[],"class_list":["post-4132","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-web-development"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Curl Basic Auth - How Does It Work? | CCBill KB<\/title>\n<meta name=\"description\" content=\"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/ccbill.com\/kb\/curl-basic-auth\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Curl Basic Auth - How Does It Work? | CCBill KB\" \/>\n<meta property=\"og:description\" content=\"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/ccbill.com\/kb\/curl-basic-auth\" \/>\n<meta property=\"og:site_name\" content=\"CCBill Knowledge Base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ccbillBIZ\/\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-25T07:09:40+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-06T12:26:49+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\" \/>\n\t<meta property=\"og:image:width\" content=\"800\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Vladimir Kaplarevic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@CCBillBIZ\" \/>\n<meta name=\"twitter:site\" content=\"@CCBillBIZ\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vladimir Kaplarevic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#article\",\"isPartOf\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth\"},\"author\":{\"name\":\"Vladimir Kaplarevic\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644\"},\"headline\":\"Curl Basic Auth - How Does It Work?\",\"datePublished\":\"2022-08-25T07:09:40+00:00\",\"dateModified\":\"2023-03-06T12:26:49+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth\"},\"wordCount\":838,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\",\"articleSection\":[\"Web Development\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/ccbill.com\/kb\/curl-basic-auth#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth\",\"url\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth\",\"name\":\"Curl Basic Auth - How Does It Work? | CCBill KB\",\"isPartOf\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage\"},\"thumbnailUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\",\"datePublished\":\"2022-08-25T07:09:40+00:00\",\"dateModified\":\"2023-03-06T12:26:49+00:00\",\"description\":\"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.\",\"breadcrumb\":{\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/ccbill.com\/kb\/curl-basic-auth\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage\",\"url\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\",\"contentUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png\",\"width\":800,\"height\":400,\"caption\":\"How does curl basic auth work?\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/ccbill.com\/kb\/curl-basic-auth#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"KB Home\",\"item\":\"https:\/\/ccbill.com\/kb\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\/\/ccbill.com\/kb\/category\/web-development\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Curl Basic Auth - How Does It Work?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/ccbill.com\/kb\/#website\",\"url\":\"https:\/\/ccbill.com\/kb\/\",\"name\":\"CCBill Knowledge Base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/ccbill.com\/kb\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/ccbill.com\/kb\/#organization\",\"name\":\"CCBill\",\"url\":\"https:\/\/ccbill.com\/kb\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png\",\"contentUrl\":\"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png\",\"width\":160,\"height\":70,\"caption\":\"CCBill\"},\"image\":{\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/ccbillBIZ\/\",\"https:\/\/x.com\/CCBillBIZ\",\"https:\/\/www.linkedin.com\/company\/ccbill\",\"https:\/\/www.youtube.com\/c\/CCBillBiz\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644\",\"name\":\"Vladimir Kaplarevic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/ccbill.com\/kb\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g\",\"caption\":\"Vladimir Kaplarevic\"},\"description\":\"Vladimir is a resident Tech Writer at CCBill. He has more than 8 years of experience in implementing e-commerce and online payment solutions with various global IT services providers. His engaging writing style provides practical advice and aims to spark curiosity for innovative technologies.\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Curl Basic Auth - How Does It Work? | CCBill KB","description":"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/ccbill.com\/kb\/curl-basic-auth","og_locale":"en_US","og_type":"article","og_title":"Curl Basic Auth - How Does It Work? | CCBill KB","og_description":"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.","og_url":"https:\/\/ccbill.com\/kb\/curl-basic-auth","og_site_name":"CCBill Knowledge Base","article_publisher":"https:\/\/www.facebook.com\/ccbillBIZ\/","article_published_time":"2022-08-25T07:09:40+00:00","article_modified_time":"2023-03-06T12:26:49+00:00","og_image":[{"width":800,"height":400,"url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png","type":"image\/png"}],"author":"Vladimir Kaplarevic","twitter_card":"summary_large_image","twitter_creator":"@CCBillBIZ","twitter_site":"@CCBillBIZ","twitter_misc":{"Written by":"Vladimir Kaplarevic","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#article","isPartOf":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth"},"author":{"name":"Vladimir Kaplarevic","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644"},"headline":"Curl Basic Auth - How Does It Work?","datePublished":"2022-08-25T07:09:40+00:00","dateModified":"2023-03-06T12:26:49+00:00","mainEntityOfPage":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth"},"wordCount":838,"commentCount":0,"publisher":{"@id":"https:\/\/ccbill.com\/kb\/#organization"},"image":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage"},"thumbnailUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png","articleSection":["Web Development"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/ccbill.com\/kb\/curl-basic-auth#respond"]}]},{"@type":"WebPage","@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth","url":"https:\/\/ccbill.com\/kb\/curl-basic-auth","name":"Curl Basic Auth - How Does It Work? | CCBill KB","isPartOf":{"@id":"https:\/\/ccbill.com\/kb\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage"},"image":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage"},"thumbnailUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png","datePublished":"2022-08-25T07:09:40+00:00","dateModified":"2023-03-06T12:26:49+00:00","description":"This guide explains what curl basic authentication is, how it works, and how to use it to access protected resources.","breadcrumb":{"@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ccbill.com\/kb\/curl-basic-auth"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#primaryimage","url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png","contentUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2022\/08\/curl-basic-auth.png","width":800,"height":400,"caption":"How does curl basic auth work?"},{"@type":"BreadcrumbList","@id":"https:\/\/ccbill.com\/kb\/curl-basic-auth#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"KB Home","item":"https:\/\/ccbill.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/ccbill.com\/kb\/category\/web-development"},{"@type":"ListItem","position":3,"name":"Curl Basic Auth - How Does It Work?"}]},{"@type":"WebSite","@id":"https:\/\/ccbill.com\/kb\/#website","url":"https:\/\/ccbill.com\/kb\/","name":"CCBill Knowledge Base","description":"","publisher":{"@id":"https:\/\/ccbill.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ccbill.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ccbill.com\/kb\/#organization","name":"CCBill","url":"https:\/\/ccbill.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png","contentUrl":"https:\/\/ccbill.com\/kb\/wp-content\/uploads\/2020\/10\/ccbill-logo.png","width":160,"height":70,"caption":"CCBill"},"image":{"@id":"https:\/\/ccbill.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ccbillBIZ\/","https:\/\/x.com\/CCBillBIZ","https:\/\/www.linkedin.com\/company\/ccbill","https:\/\/www.youtube.com\/c\/CCBillBiz"]},{"@type":"Person","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/1f198b1218f6343a2682022ac4395644","name":"Vladimir Kaplarevic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ccbill.com\/kb\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cc08885e8fec32585bae8a0f5a1aef92f8c8c4fc33692e74e0ec2e63633d2478?s=96&d=mm&r=g","caption":"Vladimir Kaplarevic"},"description":"Vladimir is a resident Tech Writer at CCBill. He has more than 8 years of experience in implementing e-commerce and online payment solutions with various global IT services providers. His engaging writing style provides practical advice and aims to spark curiosity for innovative technologies."}]}},"_links":{"self":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/4132","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/comments?post=4132"}],"version-history":[{"count":16,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/4132\/revisions"}],"predecessor-version":[{"id":4818,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/posts\/4132\/revisions\/4818"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/media\/4133"}],"wp:attachment":[{"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/media?parent=4132"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/categories?post=4132"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ccbill.com\/kb\/wp-json\/wp\/v2\/tags?post=4132"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}