2
我正在嘗試爲用戶獲取訪問令牌,以便使用iOS SDK來集成個人簽名。爲SSO用戶獲取DocuSign訪問令牌
我們的DocuSign用戶設置爲單點登錄。我們有一個非SSO,API用戶配置了用戶設置apiAccountWideAccess和allowSendOnBehalfOf啓用。
我請求的訪問令牌用於非SSO,API用戶如下:
POST /restapi/v2/oauth2/token HTTP/1.1
Host: demo.docusign.net
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
grant_type=password&client_id=<client_id>&scope=api&username=<useranme>&password=<password>
這導致以下響應:
{
"access_token": "<access-token>",
"token_type": "bearer",
"scope": "api"
}
我然後使用訪問令牌從上述嘗試爲SSO用戶獲取訪問令牌的響應如下:
POST /restapi/v2/oauth2/token HTTP/1.1
Host: demo.docusign.net
Authorization: Bearer <access-token-from-response-above>
Accept: application/json
Cache-Control: no-cache
Content-Type: application/x-www-form-urlencoded
grant_type=password&client_id=<client_id>&username=<email-address-of-sso-user>&password=&scope=api
這導致下面的結果翼迴應:
{
"errorCode": "UNSPECIFIED_ERROR",
"message": "Object reference not set to an instance of an object."
}
我下面的文檔here(用於其他帳戶用戶獲取access_tokens)。
是否有可能代表SSO用戶爲REST API獲取訪問令牌?