php SDK を使用して SNS 経由でアプリケーションを作成するとエラーが発生します。
コード:
$appName = "name";
$appPlataform = "APNS_SANDBOX";
$appAttributes = array(
"PlatformCredential" => "...",
"PlatformPrincipal" => "..."
);
$appArn = $sns->createPlatformApplication(array(
"Name" => $appName,
"Platform" => $appPlataform,
"Attributes" => $appAttributes
));
エラー:
Fatal error: Uncaught Aws\Sns\Exception\SnsException: AWS Error Code: MalformedInput, Status Code: 400, AWS Request ID: 3b169c54-6bfd-58e4-9480-d6c4931402f7, AWS Error Type: client, AWS Error Message: Top level element may not be treated as a list, User-Agent: aws-sdk-php2/2.4.3 Guzzle/3.7.2 curl/7.24.0 PHP/5.4.4 thrown in .../Aws/Common/Exception/NamespaceExceptionFactory.php on line 91