AI助手支持GPT4.0
Use Application Passwords to authenticate users without providing their passwords directly.
使用应用程序密码来认证用户,而无需直接提供其密码。
Instead, a unique password is generated for each application without revealing the user’s main password.
而是为每个应用程序生成一个唯一的密码,而不会泄露用户的主密码。
Application passwords can be revoked for each application individually.
可以分别撤销每个应用程序的应用程序密码。 p>
Important: Application Passwords can be used only for authenticating API requests such as 重要 strong>:应用密码只能用于验证API请求,例如 REST API and XML-RPC, and they won't work for regular site loginsREST API 和 XML-RPC ,它们不适用于常规网站登录
重要 strong>:应用密码只能用于验证API请求,例如 REST API and XML-RPC, and they won't work for regular site loginsREST API
REST API
.
p>
ul>
To do so, click Users on the left side of the WordPress admin, then click on the user that you want to manage.
为此,请单击WordPress管理员左侧的 Users em>,然后单击要管理的用户。 li>Scroll down until you see the Application Passwords section.向下滚动,直到看到“应用程序密码”部分。This is typically at the bottom of the page.通常在页面底部。 li>Within the input field, type in a name for your new application password, then click Add New.在输入字段中,输入新应用程序密码的名称,然后单击添加新 em>。Note: The application password name is only used to describe your password for easy management later.注意 strong>:应用程序密码名称仅用于描述您的密码,以便以后管理。It will not affect your password in any way.它不会以任何方式影响您的密码。Be descriptive, as it will lead to easier management if you ever need to change it later.具有描述性,因为如果以后需要更改它,它将使管理变得更容易。 li>Once the Add New button is clicked, your new application password will appear.单击添加新 em>按钮后,将显示新的应用程序密码。Be sure to keep this somewhere safe, as it will not be displayed to you again.确保将其保存在安全的地方,因为它不会再次显示给您。If you lose this password, it cannot be obtained again.如果您丢失了该密码,将无法再次获取。 li>
This is typically at the bottom of the page.
通常在页面底部。 li>
Note: The application password name is only used to describe your password for easy management later.
注意 strong>:应用程序密码名称仅用于描述您的密码,以便以后管理。It will not affect your password in any way.它不会以任何方式影响您的密码。Be descriptive, as it will lead to easier management if you ever need to change it later.
It will not affect your password in any way.
它不会以任何方式影响您的密码。
Be descriptive, as it will lead to easier management if you ever need to change it later.
具有描述性,因为如果以后需要更改它,它将使管理变得更容易。 li>
Be sure to keep this somewhere safe, as it will not be displayed to you again.
确保将其保存在安全的地方,因为它不会再次显示给您。
If you lose this password, it cannot be obtained again.
如果您丢失了该密码,将无法再次获取。 li>
ol>
Application Passwords can be used together with the Two Factor plugin as long as you disable the extra protection added by the
应用密码可以与双因子插件一起使用,只要您禁用由
Two Factor plugin which disables API requests with password authentication for users with Two Factor enabled.
两因素插件,可为启用了两因素的用户禁用密码身份验证的API请求 em>。 p>Use the two_factor_user_api_login_enable filter to allow API requests with password-based authentication header for all users:使用 two_factor_user_api_login_enable code>过滤器允许所有用户使用基于密码的身份验证标头的API请求: p>add_filter( 'two_factor_user_api_login_enable', '__return_true' ); add_filter('two_factor_user_api_login_enable','__return_true'); code> pre>This is not required if the user associated with the application password doesn’t have any of the Two Factor methods enabled.如果与应用程序密码关联的用户未启用任何两种因素方法,则不需要此方法。 p>Requesting Password for Application请求申请密码 h4>To request a password for your application, redirect users to:要为您的应用程序请求密码,请将用户重定向到: p>https://example.com/wp-admin/admin.php?page=auth_app https://example.com/wp-admin/admin.php?page=auth_app code> pre>and use the following GET request parameters to specify:并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
Use the two_factor_user_api_login_enable filter to allow API requests with password-based authentication header for all users:
two_factor_user_api_login_enable
使用 two_factor_user_api_login_enable code>过滤器允许所有用户使用基于密码的身份验证标头的API请求: p>add_filter( 'two_factor_user_api_login_enable', '__return_true' ); add_filter('two_factor_user_api_login_enable','__return_true'); code> pre>This is not required if the user associated with the application password doesn’t have any of the Two Factor methods enabled.如果与应用程序密码关联的用户未启用任何两种因素方法,则不需要此方法。 p>Requesting Password for Application请求申请密码 h4>To request a password for your application, redirect users to:要为您的应用程序请求密码,请将用户重定向到: p>https://example.com/wp-admin/admin.php?page=auth_app https://example.com/wp-admin/admin.php?page=auth_app code> pre>and use the following GET request parameters to specify:并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
two_factor_user_api_login_enable code>过滤器允许所有用户使用基于密码的身份验证标头的API请求: p>add_filter( 'two_factor_user_api_login_enable', '__return_true' ); add_filter('two_factor_user_api_login_enable','__return_true'); code> pre>This is not required if the user associated with the application password doesn’t have any of the Two Factor methods enabled.如果与应用程序密码关联的用户未启用任何两种因素方法,则不需要此方法。 p>Requesting Password for Application请求申请密码 h4>To request a password for your application, redirect users to:要为您的应用程序请求密码,请将用户重定向到: p>https://example.com/wp-admin/admin.php?page=auth_app https://example.com/wp-admin/admin.php?page=auth_app code> pre>and use the following GET request parameters to specify:并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
add_filter( 'two_factor_user_api_login_enable', '__return_true' ); add_filter('two_factor_user_api_login_enable','__return_true'); code> pre>This is not required if the user associated with the application password doesn’t have any of the Two Factor methods enabled.如果与应用程序密码关联的用户未启用任何两种因素方法,则不需要此方法。 p>Requesting Password for Application请求申请密码 h4>To request a password for your application, redirect users to:要为您的应用程序请求密码,请将用户重定向到: p>https://example.com/wp-admin/admin.php?page=auth_app https://example.com/wp-admin/admin.php?page=auth_app code> pre>and use the following GET request parameters to specify:并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
add_filter('two_factor_user_api_login_enable','__return_true');
code> pre>
This is not required if the user associated with the application password doesn’t have any of the Two Factor methods enabled.
如果与应用程序密码关联的用户未启用任何两种因素方法,则不需要此方法。 p>
To request a password for your application, redirect users to:
要为您的应用程序请求密码,请将用户重定向到: p>
https://example.com/wp-admin/admin.php?page=auth_app https://example.com/wp-admin/admin.php?page=auth_app code> pre>and use the following GET request parameters to specify:并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
https://example.com/wp-admin/admin.php?page=auth_app
and use the following GET request parameters to specify:
GET
并使用以下 GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
GET code>请求参数进行指定: p>app_name (required) – The human readable identifier for your app. app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.如果省略,则要求用户提供应用程序名称。 li>success_url (recommended) – The URL that you’d like the user to be sent to if they approve the connection. success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li> ul>Testing an Application Password测试应用程序密码 h4>We use curl to send HTTP requests to the API endpoints in the examples below.在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>WordPress REST API WordPress REST API h4>Make a REST API call to update a post.进行REST API调用以更新帖子。Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
app_name
app_name code>(必填)–您的应用可读的标识符。This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。If omitted, the user will be required to provide an application name.
This will be the name of the generated application password, so structure it like … “WordPress Mobile App on iPhone 12” for uniqueness between multiple versions.
这将是生成的应用程序密码的名称,因此应将其结构化为“ iPhone 12上的WordPress移动应用程序”,以实现多个版本之间的唯一性。
If omitted, the user will be required to provide an application name.
如果省略,则要求用户提供应用程序名称。 li>
success_url
success_url code>(推荐)–如果用户批准连接,您希望将其发送到的URL。Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.
Two GET variables will be appended when they are passed back — user_login and password — these credentials can then be used for API calls.
user_login
password
传递回两个GET变量后,它们将被附加- user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.
user_login code>和 password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.
password code>-这些凭据可用于API调用。If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.
If the success_url variable is omitted, a password will be generated and displayed to the user, to manually enter into your application.
如果省略 success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li>
success_url code>变量,则会生成一个密码并将其显示给用户,以手动输入您的应用程序。 li>reject_url (optional) – If included, the user will get sent there if they reject the connection. reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.如果省略 success_url code>,则用户将被发送到其仪表板。 li>
reject_url
reject_url code>(可选)–如果包含,则拒绝连接的用户将被发送到那里。If omitted, the user will be sent to the success_url, with ?success=false appended to the end.如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.
If omitted, the user will be sent to the success_url, with ?success=false appended to the end.
?success=false
如果省略,则会将用户发送到 success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.
success_url code>,并在末尾附加?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.
?success = false code>。If the success_url is omitted, the user will be sent to their dashboard.
If the success_url is omitted, the user will be sent to their dashboard.
如果省略 success_url code>,则用户将被发送到其仪表板。 li>
success_url code>,则用户将被发送到其仪表板。 li>
We use curl to send HTTP requests to the API endpoints in the examples below.
在下面的示例中,我们使用 curl 将HTTP请求发送到API端点。 p>
Make a REST API call to update a post.
进行REST API调用以更新帖子。
Because you are performing a POST request, you will need to authorize the request using your newly created base64 encoded access token.
POST
由于您正在执行 POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
POST code>请求,因此需要使用新创建的base64编码访问令牌对请求进行授权。If authorized correctly, you will see the post title update to “New Title.”如果授权正确,您将看到帖子标题更新为“新标题”。 p>curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
If authorized correctly, you will see the post title update to “New Title.”
如果授权正确,您将看到帖子标题更新为“新标题”。 p>
curl --user "USERNAME:APPLICATION_PASSWORD" -X POST -d "title=New Title" https://LOCALHOST/wp-json/wp/v2/posts/POST_ID curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID code> pre>When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
curl --user“ USERNAME:APPLICATION_PASSWORD” -X POST -d“ title = New Title” https:// LOCALHOST / wp-json / wp / v2 / posts / POST_ID
When running this command, be sure to replace USERNAME and APPLICATION_PASSWORD with your credentials (curl takes care of base64 encoding and setting the Authorization
USERNAME
APPLICATION_PASSWORD
Authorization
运行此命令时,请确保用您的凭据替换 USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
USERNAME code>和 APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
APPLICATION_PASSWORD code>(curl负责base64编码并设置 Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
Authorization code>header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
header), LOCALHOST with the hostname of your WordPress installation, and POST_ID with the ID of the post that you want to edit.
LOCALHOST
POST_ID
标头),带有您的WordPress安装主机名的 LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
LOCALHOST code>和带有您要编辑的帖子ID的 POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
POST_ID code>。 p>XML-RPC XML-RPC h4>Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。Send an XML-RPC request to list all users:发送XML-RPC请求以列出所有用户: p>curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
Unlike the WordPress REST API, XML-RPC does not require your username and password to be base64 encoded.
与WordPress REST API不同,XML-RPC不需要您的用户名和密码进行base64编码。
Send an XML-RPC request to list all users:
发送XML-RPC请求以列出所有用户: p>
curl -H 'Content-Type: text/xml' -d 'wp.getUsers1 curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php code> pre>In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
curl -H'内容类型:text / xml'-d' wp.getUsers methodName> 1 value> param>USERNAMEPASSWORD' https://LOCALHOST/xmlrpc.phpparam> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php
param>USERNAMEPASSWORD
param> USERNAME value> param> PASSWORD value> param> params> methodCall>'https://LOCALHOST/xmlrpc.php
In the above example, replace USERNAME with your username, PASSWORD with your new application password, and LOCALHOST with the hostname of your WordPress
PASSWORD
在上面的示例中,将 USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
USERNAME code>替换为用户名,将 PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
PASSWORD code>替换为新的应用程序密码,将 LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
LOCALHOST code>替换为WordPress的主机名installation.安装。This should output a response containing all users on your site.这将输出包含您网站上所有用户的响应。 p>Plugin History插件历史记录 h4>This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin这是一个功能插件,它是主要两要素身份验证插件的衍生产品. p>
installation.
安装。
This should output a response containing all users on your site.
这将输出包含您网站上所有用户的响应。 p>
This is a feature plugin that is a spinoff of the main Two-Factor Authentication plugin
这是一个功能插件,它是主要两要素身份验证插件的衍生产品
Search for “Application Passwords” under “Plugins” → “Add New” in your WordPress dashboard to install the plugin.
在WordPress信息中心的“插件”→“添加新”下搜索“应用程序密码”以安装插件。 p>
Or install it manually:
或手动安装: p>
Add this plugin as a Composer dependency Composer 依赖项
application-passwords" rel="nofollow">from Packagist:
来自Packagist的application-passwords“ rel =” nofollow“> : p>
composer require georgestephanis/application-passwords composer需要georgestephanis / application-passwords code> pre>
composer需要georgestephanis / application-passwords
原文出处:http://www.sanshu.cn/a/2624.html
群主管理都是支付大佬