Title: WP REST API &#8211; OAuth 1.0a Server
Author: Joe Hoyle
Published: <strong>2016 年 10 月 6 日</strong>
Last modified: 2024 年 8 月 5 日

---

搜索插件

![](https://ps.w.org/rest-api-oauth1/assets/banner-772x250.png?rev=3004388)

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/rest-api-oauth1/assets/icon-256x256.png?rev=3004388)

# WP REST API – OAuth 1.0a Server

 作者：[Joe Hoyle](https://profiles.wordpress.org/joehoyle/)

[下载](https://downloads.wordpress.org/plugin/rest-api-oauth1.0.4.4.zip)

 * [详情](https://cn.wordpress.org/plugins/rest-api-oauth1/#description)
 * [评价](https://cn.wordpress.org/plugins/rest-api-oauth1/#reviews)
 * [开发进展](https://cn.wordpress.org/plugins/rest-api-oauth1/#developers)

 [支持](https://wordpress.org/support/plugin/rest-api-oauth1/)

## 描述

This plugin uses the OAuth 1.0a protocol to allow delegated authorization; that 
is, to allow applications to access a site using a set of secondary credentials.
This allows server administrators to control which applications can access the site,
as well as allowing users to control which applications have access to their data.

This plugin only supports WordPress >= 4.4.

The latest stable version is also available from the [WordPress Plugin Directory](https://wordpress.org/plugins/rest-api-oauth1/).

### New to OAuth

We strongly recommend you use an existing OAuth library. You’ll be best off if you
understand the authorization process, but leave the actual implementation to well-
tested libraries, as there are a lot of edge cases.

Start reading from [the Introduction](https://cn.wordpress.org/plugins/rest-api-oauth1/docs/introduction/README.md?output_format=md)
to get started!

### For OAuth Veterans

If you already know how to use OAuth, here’s the lowdown:

 * The plugin uses **OAuth 1.0a** in
 * We use the **three-legged flow**
 * To find the REST API index, apply the [API autodiscovery process](http://v2.wp-api.org/guide/discovery/)
 * The endpoints for the OAuth process are available in the REST API index: check
   for `$.authentication.oauth1` in the index data.
    - The **temporary credentials** (request token) endpoint is `$.authentication.
      oauth1.request` (typically `/oauth1/request`)
    - The **authorization** endpoint is `$.authentication.oauth1.authorize` (typically`/
      oauth1/authorize`)
    - The **token exchange** (access token) endpoint is `$.authentication.oauth1.
      access` (typically `/oauth1/access`)
 * Your callback URL must match the registered callback URL for the application 
   in the scheme, authority (user/password) host, port, and path sections. (**Subpaths
   are not allowed.**)
 * The only signature method supported is **HMAC-SHA1**.
 * OAuth parameters are supported in the Authorization header, query (GET) parameters,
   or request body (POST) parameters (if encoded as `application/x-www-form-urlencoded`).**
   OAuth parameters are not supported in JSON data.**

## 评价

![](https://secure.gravatar.com/avatar/26cc1f2d6bf8110a36104b5d92eacf62c6948609c6f8c0afbb12ac8af9d5014f?
s=60&d=retro&r=g)

### 󠀁[very good plugin](https://wordpress.org/support/topic/very-good-plugin-2117/)󠁿

 [springapidev](https://profiles.wordpress.org/springapidev/) 2021 年 3 月 6 日

it is very good plugin, please update.

![](https://secure.gravatar.com/avatar/1b858abea6bc56a08cb57bae336d91f75daeb45f7cbc34092c67e52af1894485?
s=60&d=retro&r=g)

### 󠀁[Good But](https://wordpress.org/support/topic/good-but-179/)󠁿

 [Ahmed Hnewa](https://profiles.wordpress.org/ahmedriyadh/) 2021 年 2 月 22 日

Really Useful And Good Plugin But Please 1- Reply on The Support Forum 2- Update
it To Work Good With Last WordPress Verison 3 – No Clear Docs 4 – not work with 
localhost

![](https://secure.gravatar.com/avatar/0df54330eb38126db80a0ce8142b8fa7b4c4b548bb796ed2f138c8ff2c83513e?
s=60&d=retro&r=g)

### 󠀁[Not working](https://wordpress.org/support/topic/not-working-3206/)󠁿

 [majidmad](https://profiles.wordpress.org/majidmad/) 2020 年 4 月 5 日

Missing parameter oauth_token

![](https://secure.gravatar.com/avatar/399560c7c25f6078e119aa3ad62432469f986ef337ecb723c618a8fd25be4ae7?
s=60&d=retro&r=g)

### 󠀁[Automatically delete application](https://wordpress.org/support/topic/automatically-delete-application/)󠁿

 [mphramin](https://profiles.wordpress.org/mphramin/) 2018 年 9 月 8 日

I have create application with consumer name, description and callback. but after
few our, that application had removed. why did that?

![](https://secure.gravatar.com/avatar/35512f5059008ab0a423898ef22ade924f169d2d94b6900cb337d05f814a69fc?
s=60&d=retro&r=g)

### 󠀁[Worked like a charm!](https://wordpress.org/support/topic/worked-like-a-charm-118/)󠁿

 [Rehmat Alam](https://profiles.wordpress.org/rehmatworks/) 2017 年 10 月 8 日

Got this working after some good amount of work! Thanks for bringing this and making
API calls secure.

![](https://secure.gravatar.com/avatar/2f45c75697cc9a026fba1c830389ae7a1dc580ff519ec07c4a89c65a225ff246?
s=60&d=retro&r=g)

### 󠀁[DOesn’t authenticate, no response](https://wordpress.org/support/topic/doesnt-authenticate-no-response/)󠁿

 [eddiewebb](https://profiles.wordpress.org/eddiewebb/) 2017 年 8 月 3 日

Just google { "code": "rest_cannot_create", "message": "Sorry, you are not allowed
to create posts as this user.", "data": { "status": 401 } } and you’ll find anyone
using this plugin having issues authenticating to perform and protected operations.
Dev team is not even responding to github issues or forum posts.

 [ 阅读所有6条评价 ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/)

## 贡献者及开发者

「WP REST API – OAuth 1.0a Server」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Joe Hoyle ](https://profiles.wordpress.org/joehoyle/)
 *   [ Ryan McCue ](https://profiles.wordpress.org/rmccue/)
 *   [ Rachel Baker ](https://profiles.wordpress.org/rachelbaker/)
 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ Jonny Harris ](https://profiles.wordpress.org/spacedmonkey/)

[帮助将「WP REST API – OAuth 1.0a Server」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/rest-api-oauth1)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/rest-api-oauth1/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/rest-api-oauth1/)，或通过[RSS](https://plugins.trac.wordpress.org/log/rest-api-oauth1/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/rest-api-oauth1/)。

## 额外信息

 *  版本 **0.4.4**
 *  最后更新：**2 年前**
 *  活跃安装数量 **8,000+**
 *  WordPress 版本 ** 4.4 或更高版本 **
 *  已测试的最高版本为 **6.6.5**
 *  PHP 版本 ** 5.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/rest-api-oauth1/)
 * 标签
 * [api](https://cn.wordpress.org/plugins/tags/api/)[JSON](https://cn.wordpress.org/plugins/tags/json/)
   [rest](https://cn.wordpress.org/plugins/tags/rest/)[rest-api](https://cn.wordpress.org/plugins/tags/rest-api/)
 *  [高级视图](https://cn.wordpress.org/plugins/rest-api-oauth1/advanced/)

## 评级

 3.7 星（最高 5 星）。

 *  [  4 条 5 星评价     ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/?filter=5)
 *  [  1 条 4 星评价     ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/?filter=2)
 *  [  2 条 1 星评价     ](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/rest-api-oauth1/reviews/)

## 贡献者

 *   [ Joe Hoyle ](https://profiles.wordpress.org/joehoyle/)
 *   [ Ryan McCue ](https://profiles.wordpress.org/rmccue/)
 *   [ Rachel Baker ](https://profiles.wordpress.org/rachelbaker/)
 *   [ Daniel Bachhuber ](https://profiles.wordpress.org/danielbachhuber/)
 *   [ Jonny Harris ](https://profiles.wordpress.org/spacedmonkey/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/rest-api-oauth1/)