Creating human_users via REST API

I am creating a small service to create new ShotGrid users in Go.

When doing a POST to /api/v1/entity/human_users I run into a 401 issue:

"{\"errors\":[{\"id\":\"caa41a1e3a250aea2eae31aadf0454f4\",\"status\":401,\"code\":110,\"title\":\"User promotion to active is permitted only for Identity Users\",\"source\":null,\"detail\":null,\"meta\":null}]}"

I am successfully logging in with a POST to /api/v1/auth/access_token using my client_id, client_secret, with a grant_type of “client_credentials”. The account I am using has full admin access/permissions (have tested it can successfully GET).

I am not sure what it means by promotion to active is permitted only for “Identity Users”. Any tips?

Thanks.

Since the change from ShotGrid Authentication to Autodesk Identity you are no longer able to activate users using script user credentials.

You would have to login with a HumanUser that has permissions to activate users.

That will solve your issue.

1 Like

Thank you, I will try that out. I believe that is the missing piece. I will report back with the solution and close the ticket.

1 Like

OK the above fix worked for my initial issue. Creating an actual user account to authenticate with has worked. I am now able to POST to /entity/human_users via the Bearer Token provided.

However, with that token, I am getting a 401 unauthorized when POSTing to /entity/human_users to create a new HumanUser. We are looking at the permissions and everything is more or less wide open. We aren’t sure why we’re still getting a 401. The top permission “Create entities” is ALLOWED, which makes me feel this user should be able to create this new HumanUser.

We’ve put this account into the Admin group and still get a 401.

Any suggestions? Thanks.

I’m not sure, do you get any error attached to that just 401?

1 Like
"{\"errors\":[{\"id\":\"ff9e5a7d526892fc0d71c437abe26e59\",\"status\":401,\"code\":102,\"title\":\"Unauthorized\",\"source\":null,\"detail\":null,\"meta\":null}]}"

This is the error I get. The description is just “unauthorized”. I’m trying a few other things, but I’m still stumped at the moment. Thanks for taking a look.

I’m not sure what this could be, I would recommend sending a ticket just to make sure you have put your eggs into multiple baskets.