首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用docusignapi更新UserProfile时出错[docusignapi]

使用docusignapi更新UserProfile时出错[docusignapi]
EN

Stack Overflow用户
提问于 2020-04-23 09:43:22
回答 1查看 91关注 0票数 0

我想更新用户配置文件(Federated_status),使用DocuSign管理Api。

下面是在URL中指定的使用Auth (签名organization_read group_read user_read user_write)生成登录UI的作用域。

但是,当我使用下面的代码调用Docusing时,它不允许任何更新,并抛出“未经授权”的错误

代码语言:javascript
复制
try
            {
                HttpContent PostContent = new StringContent(JsonConvert.SerializeObject(ObjUser), Encoding.UTF8, "application/json");
                string reponsebody = string.Empty;
                string Url = "https://api-d.docusign.net/management/v2/organisation/" + OrgID + "users/profiles";
                using (var client = new HttpClient())
                {

                    client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application / json"));
                    client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Bearer", token));
                    HttpResponseMessage rep = client.PostAsync(new System.Uri(Url), PostContent).Result;
                    reponsebody = rep.Content.ReadAsStringAsync().Result;
                }
                var userProfileResponse = JsonConvert.DeserializeObject<UserProfile>(reponsebody);
                return userProfileResponse;
            }

再进一步

  1. 我已经包含了所有角色(参见下面用于授予auth代码的URL )

uri=http://localhost50455

  1. 当我在浏览器中粘贴上面的url时,我只获得了以下角色的同意: a.读取组织的域详细信息。b.阅读组织的身份提供者详细信息。c.阅读帐户的权限集列表。d.阅读帐户详细信息。
代码语言:javascript
复制
- I don't see any user related permission there. i am not sure why, but you can see i have add all the scopes related to users (user\_read user\_write) to that URL.

任何建议

我仍然收到错误: 400 -“未经授权”,同时更新用户配置文件。

EN

回答 1

Stack Overflow用户

发布于 2020-04-23 18:27:46

我怀疑您的问题与您在用于的URL中指定的适当范围有关。(这是帐户-d URL)

范围检查列表

确保URL中的&scope参数具有此endpint所需的正确范围。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61384086

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档