{"id":7011,"date":"2025-04-03T10:37:42","date_gmt":"2025-04-03T01:37:42","guid":{"rendered":"https:\/\/cooss.net\/using-wordpress-application-passwords-rest-api-en\/"},"modified":"2025-04-03T10:37:42","modified_gmt":"2025-04-03T01:37:42","slug":"using-wordpress-application-passwords-rest-api-en","status":"publish","type":"post","link":"https:\/\/cooss.net\/en\/using-wordpress-application-passwords-rest-api-en\/","title":{"rendered":"Using WordPress Application Passwords (REST API)"},"content":{"rendered":"\n<p>In the WordPress menu, if you look at the &#8216;<strong>Users &gt; Profile<\/strong>&#8216; page, there is an item called &#8216;<strong>Application Passwords<\/strong>&#8216;.<\/p>\n\n\n\n<p>When a specific user needs to access WordPress through an external program to write or edit posts, the purpose is to create an authentication system that requires verifying a password set in advance. I thought I wouldn&#8217;t have a use for it, but recently, while studying &#8216;automation of work&#8217;, I found a need to use it. I will summarize how to use WordPress application passwords by calling it in the Make.com automation process as an example.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Password Generation<\/h3>\n\n\n\n<p>Define a name for identification and click the &#8216;Add New Application Password&#8217; button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"294\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2-1024x294.png\" alt=\"WordPress Application Password Generation\" class=\"wp-image-6682\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2-1024x294.png 1024w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2-300x86.png 300w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2-768x221.png 768w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2-600x172.png 600w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-2.png 1305w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Then, the password will be displayed as shown below. This password is displayed only once, and there is no way to confirm it afterward, so you must copy it somewhere before proceeding to the next step.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"918\" height=\"319\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-3.png\" alt=\"WordPress Application Password Confirmation\" class=\"wp-image-6688\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-3.png 918w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-3-300x104.png 300w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-3-768x267.png 768w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-3-600x208.png 600w\" sizes=\"(max-width: 918px) 100vw, 918px\" \/><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>You can only see the creation date as shown below, and the list will be displayed in a form where you can only discard it.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"289\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4-1024x289.png\" alt=\"WordPress Application Password List\" class=\"wp-image-6694\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4-1024x289.png 1024w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4-300x85.png 300w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4-768x216.png 768w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4-600x169.png 600w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-4.png 1384w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">BASE64 Encoding<\/h3>\n\n\n\n<p>Now, encode the string that connects the username and the generated password. If the user ID at the time of password creation is &#8216;admin&#8217; and the password is &#8216;abcd efgh ijkl mnop&#8217;, you should encode the string below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>admin:abcd efgh ijkl mnop<\/code><\/pre>\n\n\n\n<p>It seems you need to know a bit of programming to encode, but if you request ChatGPT as below, it will do it for you right away.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Please base64 encode the following.\nadmin:abcd efgh ijkl mnop<\/code><\/pre>\n\n\n\n<p>The encoded string will be displayed in the form below.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>YWRtaW46YWJjZCBlZmdoIGlqa2wgbW5vcA==<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Utilization of Password (Encoded String)<\/h3>\n\n\n\n<p>In my case, I needed it to call WordPress via the HTTP module on <a href=\"https:\/\/www.make.com\/en\/register?pc=cooss\" target=\"_blank\" rel=\"noreferrer noopener\">Make.com<\/a> to create a post.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter is-resized\"><a href=\"https:\/\/www.make.com\/en\/register?pc=cooss\" target=\"_blank\" rel=\"noreferrer noopener\"><img decoding=\"async\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/03\/make-logo.png\" alt=\"Automation with Make.com\" style=\"width:467px;height:auto\" title=\"Automation with Make.com\" \/><\/a><\/figure>\n<\/div>\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Although there is a separate module prepared for writing and editing WordPress posts in the <a href=\"https:\/\/www.make.com\/en\/register?pc=cooss\" target=\"_blank\" rel=\"noreferrer noopener\">Make<\/a> modules, if you want to input other values (e.g., Custom Taxonomy) that are not provided as default items such as title\/content\/category\/post meta, you can also use the method of calling WordPress&#8217;s API through the HTTP module to instruct the necessary tasks.<\/p>\n\n\n\n<p>The image below captures part of the screen where I want to modify the Custom Taxonomy of an existing post. By recording &#8220;Authorization: Basic encoded password&#8221; in the header section, you will pass the pre-authorized password when calling the WordPress API.<\/p>\n\n\n\n<p>Of course, there are other methods besides Basic authentication, but this should suffice for my purposes.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"521\" height=\"790\" src=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-6.png\" alt=\"\" class=\"wp-image-6706\" title=\"\" srcset=\"https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-6.png 521w, https:\/\/cooss.net\/wp-content\/uploads\/2025\/04\/image-6-198x300.png 198w\" sizes=\"(max-width: 521px) 100vw, 521px\" \/><\/figure>\n<\/div>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the WordPress menu, if you look at the &#8216;Users &gt; Profile&#8216; page, there is an item called &#8216;Application Passwords&#8216;. When a specific user needs to access WordPress through an external program to write or edit posts, the purpose is to create an authentication system that requires verifying a password set in advance. I thought [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[159,86],"tags":[],"class_list":["post-7011","post","type-post","status-publish","format-standard","hentry","category-marketing-automation-en","category-wordpress-en"],"_links":{"self":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts\/7011","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/comments?post=7011"}],"version-history":[{"count":0,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/posts\/7011\/revisions"}],"wp:attachment":[{"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/media?parent=7011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/categories?post=7011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cooss.net\/en\/wp-json\/wp\/v2\/tags?post=7011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}