API Create Employee function 403 Authorization failed

  • 1
  • Problem
  • Updated 3 weeks ago
  • (Edited)
Since a few days we get an error from the api, when using the /Users/AccountUser function.
The Error is HTTP Status 403
{
    "code": "Forbidden",
    "message": {
        "lang": "en-US",
        "value": "Authorization failed: AccountUser.You are not authorized to perform this operation."
    },
    "reason": "NotAuthorized"
}

The API creates a client user but not an employee. With the same authentication i can create a client user using /Users without an error.

So it seems that only the /Users/AccountUser function is not working right.

Do you have any ideas what the problem could be?

I have tested with our application who is using the api and also postman gives exactly the same error message.

The account to get the access token has admin rights. I can login with this account to sharefile webpage and create a new employee without problems.

Also the code in our application has not changed and was working for more than three years.
Photo of Marc Gut

Marc Gut

  • 2 Posts
  • 0 Reply Likes

Posted 3 weeks ago

  • 1
Photo of Marc Gut

Marc Gut

  • 2 Posts
  • 0 Reply Likes
Looks like the reason is the api url that i use.

If i use the following:
https://{account}.sf-api.com/sf/v3/Users/AccountUser
I get the 403 Error.

If i use:
https://{account}.sf-api.eu/sf/v3/Users/AccountUser
Everything is working correct.

So i need to use the EU Api -> sf-api.eu