Authenticate with email and password.
On success a 200 response contains an AuthenticationResult with JWT tokens. Pass the AccessToken as Authorization: Bearer <token> on all subsequent VMS API calls.
When MFA is required the response instead contains a ChallengeName and Session. Use RespondToAuthChallenge (same Cognito endpoint, target AWSCognitoIdentityProviderService.RespondToAuthChallenge) to complete the challenge.
Environments: the ClientId you send selects the environment. Use the Production client ID (ui2sor283s9ujk23cr47e0kk4) for live traffic or the Sandbox client ID (38mnl92m5tsvbuu6qliah80sag) for testing.
Note: This request is sent directly to AWS Cognito, not the VMS API. The API explorer is disabled for this operation; use the curl example below or your own Cognito client.
curl --request POST \
--url https://cognito-idp.us-east-1.amazonaws.com/ \
--header 'Content-Type: application/x-amz-json-1.1' \
--header 'X-Amz-Target: AWSCognitoIdentityProviderService.InitiateAuth' \
--data '{
"AuthFlow": "USER_PASSWORD_AUTH",
"ClientId": "ui2sor283s9ujk23cr47e0kk4",
"AuthParameters": {
"USERNAME": "[email protected]",
"PASSWORD": "your-password"
}
}'