0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

CognitoのAPIを直接叩く@ユーザプール編

Last updated at Posted at 2020-08-21

CognitoのAPIを直接叩く@ユーザプール編

認証(USER_PASSWORD_AUTH)を許容する必要あり

POST https://cognito-idp.ap-northeast-1.amazonaws.com/ HTTP/1.1
content-type: application/x-amz-json-1.1
x-amz-target: AWSCognitoIdentityProviderService.InitiateAuth

{
    "AuthFlow": "USER_PASSWORD_AUTH",
    "ClientId": "ClientId",
    "AuthParameters": {
        "USERNAME": "username",
        "PASSWORD": "password"
    }
}

属性設定・更新

POST https://cognito-idp.ap-northeast-1.amazonaws.com/ HTTP/1.1
content-type: application/x-amz-json-1.1
x-amz-target: AWSCognitoIdentityProviderService.UpdateUserAttributes

{
    "AccessToken": "access_token_str",
    "UserAttributes": [
        {
            "Name": "address",
            "Value": "address_value"
        }
    ]
}

ユーザ削除

POST https://cognito-idp.ap-northeast-1.amazonaws.com/ HTTP/1.1
content-type: application/x-amz-json-1.1
x-amz-target: AWSCognitoIdentityProviderService.DeleteUser

{
    "AccessToken": "access_token_str"
}

関連

CognitoのAPIを直接叩く@IDプール編

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?