I have read numerous posts on this and other Tableau forum, I have read through the documentation several times, but still while trying to login to the Tableau using the REST API, I keep on getting errors.
I have double checked the contentUrl (tried with both empty string and actual side ID obtained from the site settings). For the username, I have tried the [email protected], username as shown in the account settings, and even added the local\username as shown in the account settings. But nothing still, I keep on getting the 401001 error.
Its a bit frustrating that the API is not designed properly as the return value can give two possible errors - either username/password incorrect or contentUrl is wrong. A right API should have given 401001 for username/password failure and something else, like 401002 for content Url failure.
Am using the below in Postman (I've tried the XML version also, but keep getting the same error):
https://my--tab--server.---ondemand.com/api/2.8/auth/signin
{
"credentials": {
"name": "my----username---",
"password": "my-----password",
"site": {
"contentUrl": "HR"
}
}
}
Response is:
<error code="401001">
<summary>Signin Error</summary>
<detail>Error signing in to Tableau Server</detail>
</error>
Am able to successfully logon to the web portal using the same user credentials.
So, what can I be doing wrong here? Any inputs would be really helpful.
Thanks