我想更新用户配置文件(Federated_status),使用DocuSign管理Api。
下面是在URL中指定的使用Auth (签名organization_read group_read user_read user_write)生成登录UI的作用域。
但是,当我使用下面的代码调用Docusing时,它不允许任何更新,并抛出“未经授权”的错误
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;
}再进一步
- 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 -“未经授权”,同时更新用户配置文件。
发布于 2020-04-23 18:27:46
https://stackoverflow.com/questions/61384086
复制相似问题