1 2 3 4 5 6 7 |
curl -v \ -X POST \ -H "Content-Type: application/x-amz-json-1.1" \ -H "X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth" \ -H "X-Amz-User-Agent: aws-amplify/0.1.x js" \ -d '{"AuthFlow":"USER_PASSWORD_AUTH","AuthParameters":{"USERNAME":"[YOUR_COGNITO_USERS_USERNAME]","PASSWORD":"[YOUR_COGNITO_USERS_PASSWORD]"},"ClientId":"[YOUR_COGNITO_USER_POOL_APP_CLIENT_ID]","ClientMetadata":{}}' \ https://cognito-idp.[YOUR_COGNITO_REGION].amazonaws.com | jq |
Your Cognito app clients setting must be checked following option.
Enable username-password (non-SRP) flow for app-based authentication (USER_PASSWORD_AUTH)