Creating cognito Facebook identity provider?

156 views Asked by At

I'm using boto3 on a lambda create a Facebook Identity Provider using:

response = client.create_identity_provider(
    UserPoolId='us-east-2_asqweo3',
    ProviderName='MyAppProviderName',
    ProviderType='Facebook',
    ProviderDetails={
        'app_id': 'xxxxxxxx',
        'app_secret': 'xxxxxxxx'
    }
)

...but I'm getting an error saying

Identity provider cannot be of type 'Facebook'

What am I doing wrong?

1

There are 1 answers

0
Ussama Zubair On

ProviderName and ProviderType must have same value i.e. 'Facebook'

Also ProviderDetails for Facebook should be like

"ProviderDetails": { "client_id": "xxxxxxxx", "client_secret": "xxxxxxxx", "authorize_scopes": "public_profile, email" }

I know it's a late reply, but posting anyway for anyone who is facing this issue.