'default', 'region' => 'us-east-2', 'version' => '2014-06-30' ]); $identityPoolName = "PHP_SDK_test_identity_pool"; $identityPoolid = "us-east-2:1234567890112-abcdefg"; $appid = "amzn1.application-oa2-client.1234567890112-abcdefg"; $facebook = "graph.facebook.com"; $google = "accounts.google.com"; $amazon = "www.amazon.com"; $twitter = "api.twitter.com"; $digits = "www.digits.com"; try { $result = $identityClient->updateIdentityPool([ 'AllowUnauthenticatedIdentities' => false, 'IdentityPoolName' => $identityPoolName, 'IdentityPoolId' => $identityPoolid, 'SupportedLoginProviders' => [$amazon => $appid ] ]); echo $result["IdentityPoolId"]["ClientId"]; var_dump($result); } catch (AwsException $e) { // output error message if fails echo $e->getMessage() . "\n"; error_log($e->getMessage()); } // snippet-end:[cognito.php.identity_pool.add_login_provider.main] // snippet-end:[cognito.php.identity_pool.add_login_provider.complete] // snippet-comment:[These are tags for the AWS doc team's sample catalog. Do not remove.] // snippet-sourcedescription:[AddLoginProvider.php demonstrates how to associate an identity pool with an identity provider.] // snippet-keyword:[PHP] // snippet-sourcesyntax:[php] // snippet-keyword:[AWS SDK for PHP v3] // snippet-keyword:[Code Sample] // snippet-keyword:[Amazon Cognito] // snippet-service:[cognito] // snippet-sourcetype:[full-example] // snippet-sourcedate:[2019-03-29] // snippet-sourceauthor:[jschwarzwalder (AWS)]