Oauth 接收带有/令牌API端点的错误代码1004
oauth令牌授权是否需要付费帐户?我尝试使用免费帐户和试用帐户执行以下操作 发送/令牌POST将导致:Oauth 接收带有/令牌API端点的错误代码1004,oauth,smartsheet-api,Oauth,Smartsheet Api,oauth令牌授权是否需要付费帐户?我尝试使用免费帐户和试用帐户执行以下操作 发送/令牌POST将导致: { "errorCode": 1004, "message": "You are not authorized to perform this action.", "refId": "cd9hgzwmdduh" } 我使用以下参数: grant_type: authorization_code code: <acquired from step 1. in oaut
{
"errorCode": 1004,
"message": "You are not authorized to perform this action.",
"refId": "cd9hgzwmdduh"
}
我使用以下参数:
grant_type: authorization_code
code: <acquired from step 1. in oauth flow>
hash: <see below>
这些是我在成功实现端点之前纠正的错误:
|
连接在app\u secret
和code
之间。要发送的正确sha256哈希应为:
echo-n“$app_secret |$code”| openssl dgst-sha256
内容类型:应用程序/x-www-form-urlencoded
POST /2.0/token HTTP/1.1
Host: api.smartsheet.com
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&client_id=<client_id>&code=<code from step 1 of oauth flow>&hash=<see above>
POST/2.0/token HTTP/1.1
主持人:api.smartsheet.com
内容类型:application/x-www-form-urlencoded
grant\u type=authorization\u code&client\u id=&code=&hash=
```
POST /2.0/token HTTP/1.1
Host: api.smartsheet.com
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code&client_id=<client_id>&code=<code from step 1 of oauth flow>&hash=<see above>