Not able to use CURL APIs to get the token


I am using this curl API to get the auth token, but it is keep giving me error even after entering same username and password, which I have used to log-in into my Anaplan account, Please help here




curl -X POST --user {user}:'{password}'


Error -


{"status":"FAILURE_BAD_CREDENTIAL","statusMessage":"Authentication Failure. If you're unsuccessful after multiple attempts, your account may be locked. If you are using the Anaplan login page, click the 'Forgot Password' link. Otherwise, contact your Anaplan administrator or Anaplan Support."}


  • The user:password parameter is a single command argument, and if using single quotes (to prevent your shell interpreting certain character sequences) then both should be enclosed together like 'user:password'

  • I find setting a variable is simple, and as Ben said you need to enclose the full string. For a .bat file I used double quotes.


    @Echo off


    set AnaplanUser="$$w0rd"


    curl --user %AnaplanUser%