Unable to get access token with OAuth2 Password Grant

  • 1
  • Question
  • Updated 2 months ago
  • (Edited)
Hey guys,

we want to use the ShareFile API to create folders and share them with users of our company. We want to perform these actions via Python.
So our IT generated a 'Client Id', 'Client Secret' and left the 'Redirect URI' as default.
We had a look at your code samples for Python, but we already have problems to get a token during the first step.

hostname = "COMPANYDOMAIN.sharefile.eu"

The Python function calls an URL with the following parameters like described here:


If I execute the function or if I use Postman, I get this message:
"error": "invalid_client", "error_description": "client_id or client_secret is invalid"

However, I am able to use the "Authorization" function in Postman and to get a token.
My theory is, that Postman opens a website, where I have to enter my username and my password. Before I enter my login data, I click the option to use the Employee registration and enter my login data there. So I assume that this process is not covered by the OAuth2 Password Grant, because it tries to enter the login data into the original login mask instead of the Employee mask. Am I right?

So how can we solve this issue?
Photo of Erik Steiner

Erik Steiner

  • 2 Posts
  • 0 Reply Likes
  • frustrated

Posted 1 year ago

  • 1
Photo of Erik Steiner

Erik Steiner

  • 2 Posts
  • 0 Reply Likes
Is anyone able to help?
Photo of Jenya


  • 1 Post
  • 0 Reply Likes