cognito_add_account {cognitoR}R Documentation

Allow create an user in Cognito Pool

Description

This method is working with amazing package "paws" , so you need to have the required AWS secret and access key (see example).

Usage

cognito_add_account(
  cognito_config,
  Username,
  UserAttributes,
  DesiredDeliveryMediums,
  ...
)

Arguments

cognito_config

- Cognito Config list

Username

- Username to use in Cognito - This can be a username, email ,phone depending configuration in Amazon Pool.

UserAttributes

- User attributes: This can be multiples attributes, depends of configuration in Amazon Pool.

DesiredDeliveryMediums

- Medium to delivert email when user is created, can be EMAIL or SMS

...

extra params to pass to method paws::admin_create_user

Details

Also needs to have the config for cognitoR. Specially the pool Id (group_id in config), where the new user is created.

Value

boolean

Examples

## Not run: 
Sys.setenv(
AWS_ACCESS_KEY_ID = '',
AWS_SECRET_ACCESS_KEY = '',
AWS_REGION = ''
)
cognito_add_account("account@mail.com",
                    UserAttributes = list(list(Name = "email", Value = "account@mail.com"),
                                          list(Name = "phone_number", Value = "+12123212312321")
                                     ),
                    DesiredDeliveryMediums = "EMAIL"
                    )

## End(Not run)

[Package cognitoR version 1.0.5 Index]