Hi,
I'm following the Anaplan API and trying to create an authentication token. I'm using the command with my username and password included:
curl -X POST --user YourUser.@anaplan.com:YourPassword https://auth.anaplan.com/token/authenticate
However, when I run it I get an error message FAILURE_BAD_CREDENTIAL. I'm using the correct credentials though. Not sure how to resolve this issue. Password has no special characters in it and I'm not using SSO to login.
Solved! Go to Solution.
curl --user handles base64-encoding the user:password for basic authentication. If you wanted to do it yourself you would directly provide an Authorization header using -H "Authorization: Basic xxxxxx" where xxxxxx is the base64-encoded username:password, but that shouldn't be necessary. The only thing that could trip it up is a colon in the username.
If you pass the -v flag to curl you will get more useful output to standard error. I can't see anything obviously wrong with the command though. What does the response look like?
curl --user handles base64-encoding the user:password for basic authentication. If you wanted to do it yourself you would directly provide an Authorization header using -H "Authorization: Basic xxxxxx" where xxxxxx is the base64-encoded username:password, but that shouldn't be necessary. The only thing that could trip it up is a colon in the username.
If you pass the -v flag to curl you will get more useful output to standard error. I can't see anything obviously wrong with the command though. What does the response look like?