If your Amazon Cognito User Pool is configured with a Secret you need to append a SecretHash to the API's query argument. Otherwise you end up with error messages.
An error occurred (NotAuthorizedException) when calling the InitiateAuth operation: Client examplefoobar is configured for secret but secret was not received
Unfortunately the AWS Command Line Interface is unable to compute the SecretHash for you. Instead they provide you with a Python Script to do the computation for you.
You can also compute the SecretHash with OpenSSL. I do this in Bash Scripts. For example here is a little script to