2 Replies Latest reply on Jan 1, 2018 8:34 AM by Ashish Jain

    REST API Authentication from Postman vs Web App

    Ashish Jain

      I am trying to perform some actions on the Tableau server via REST API for which I require the Auth token. I tried using the signin API from Postman and it works like a charm. However the same code is giving "Bad Request" error whe tried calling from javacript code from my webpage.


           var dataVal = {

                      "credentials": {

                          "name": "admin",

                          "password": "admin",

                          "site": {

                              "contentUrl": "MySite"






                      contentType: 'application/json',

                      data: JSON.stringify(dataVal),

                      dataType: 'jsonp',

                      success: function (data) {

                          console.log("call succeeded");


                      error: function (request, textStatus, errorThrown) {



                      processData: false,

                      type: 'POST',

                      url: 'http://mytableauserver/api/2.6/auth/signin'



      The above code return token, siteid, userid from postman but return ""BAD REQUEST" error from javascript code. Any pointers will be highly appreciated.