3

I am trying to connect to MicroStrategy REST API via curl in order to obtain the session state. I have tried a PHP code using this example https://community.microstrategy.com/s/article/Library-REST-API-Login-PHP?language=en_US.

I get the following error:

{"code":"ERR009","message":"The user's session has expired, please reauthenticate","ticketId":"d2a5595614634adba2bb07e5b15bedc9"}

I've also tried to call the API directly from curl on Windows command line.

        curl -X POST "http://localhost:8080/MicroStrategyLibrary/api/auth/login" 
    -H "accept: application/json" -H "Content-Type: application/json" 
   -d "{\"username\":\"Administrator\",\"password\":\"myPassword\",
      \"loginMode\":1,\"maxSearch\":3,\"workingSet\":10,\"changePassword\":false,
      \"newPassword\":\"string\",\"metadataLocale\":\"en_us\",
      \"warehouseDataLocale\":\"en_us\",\"displayLocale\":\"en_us\",
      \"messagesLocale\":\"en_us\",\"numberLocale\":\"en_us\",\"timeZone\":\"UTC\",
      \"applicationType\":35}"

I do not get any response for this call.

What is the reason for this error?

Shankar
  • 2,625
  • 3
  • 25
  • 49
vifor
  • 31
  • 3
  • I was able to work on a solution using Postman. The collections, runner and workflow features were particullary useful to combine calls to different endpoints and analyze the results . – vifor Apr 02 '22 at 20:38

0 Answers0