coinbase-node:范围与当前的API版本不匹配

时间:2017-12-26 11:29:28

标签: node.js oauth-2.0 coinbase-api

我建立一个网站是用户通过coinbase进行身份验证,然后通过与Auth2的连接让网站代表用户行事。当我与Auth2连接时会出现问题。 https://github.com/coinbase/coinbase-node

InvalidScope: Scopes don't match current API version.
at handleHttpError (/home/rasmus/Documents/bitlounge/node_modules/coinbase/lib/errorHandler.js:46:15)
at Request.onGet [as _callback] (/home/rasmus/Documents/bitlounge/node_modules/coinbase/lib/ClientBase.js:155:10)
at Request.self.callback (/home/rasmus/Documents/bitlounge/node_modules/request/request.js:187:22)
at emitTwo (events.js:126:13)
at Request.emit (events.js:214:7)
at Request.<anonymous> (/home/rasmus/Documents/bitlounge/node_modules/request/request.js:1044:10)
at emitOne (events.js:116:13)
at Request.emit (events.js:211:7)
at IncomingMessage.<anonymous> (/home/rasmus/Documents/bitlounge/node_modules/request/request.js:965:12)
at emitNone (events.js:111:20)

我得到的错误是:

'wallets:accounts:read'

我尝试使用var client = new Client({'accessToken': user.accessToken, 'refreshToken': user.refreshToken, "scope": ["wallet:accounts:read"]}); 范围,但没有成功。

<?php

$myarr = "White McGregor Waine";

$myarr = explode(" ",$myarr);

foreach($myarr as $value){
    $sql = "SEECT title FROM table where authors = '$value'";
    echo $sql;

}

1 个答案:

答案 0 :(得分:0)

Coinbase API不支持一个密钥的多版本访问,您应该禁用密钥的v1 API并仅保留v2。如果还需要v1 API,则可以创建单独的API密钥并仅启用v1 API。