并确保提供用户的电子邮件或用户ID,并且不要同时提供它们:请注意,您需要指定电子邮件或user_id.但是,您不能同时指定两者.请参阅文档此处 I have been successful in creating a new Account User from following this tutorial: https://forge.autodesk.com/en/docs/bim360/v1/reference/http/users-POST/#example, and have used the PATCH method to set their status to active on Postman.I would like to set their role and access_level but I am having trouble doing so. I have followed the link below to try and perform this function, but it requires the user to already be a BIM 360 Project Admin for it to work.https://forge.autodesk.com/en/docs/bim360/v1/reference/http/projects-project_id-users-user_id-PATCH/I also tried following the next link below to add a User to a project, but I am getting errors that I am unsure how to fix.https://forge.autodesk.com/en/docs/bim360/v1/reference/http/projects-project_id-users-import-POST/URI: https://developer.api.autodesk.com/hq/v2/accounts/:account_id/projects/:project_id/users/importMethod: PATCHAuthorization: *******************************************Content-Type: application/jsonx-user-id: {{user_id}}Body:{ "email": "john.smith@mail.com", "services": { "document_management": { "access_level": "account_admin" } }, "company_id": ************************************, "industry_roles": [ ************************************ ]}(The id for industry_role is IT).Error:{ "code": 1004, "message": "this user doesn't exist."}I am unsure how I am getting this error since the User Id used for x-user-id is the same user_id associated with the email given in the request body. Is there a way to fix this or another method I can use? 解决方案 The x-user-id header is not for specifying the user to import but rather: x-user-id string In a two-legged authentication context, the app has access to all users specified by the administrator in the SaaS integrations UI. By providing this header, the API call will be limited to act on behalf of only the user specified.Remove this field if that's not what you intended.Verify the user id and email match each other via /GET users and /GET users:userid.And be sure to provide either the user's email or the user ID and don't provide them both: Note that you need to specify either an email, or a user_id. However, you cannot specify both.See doc here 这篇关于如何在Postman上发布BIM360的POST或PATCH用户角色和access_level的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
07-22 15:30
查看更多