Question

I have an error when creating an application over SNS using php SDK.

Code:

$appName = "name";
$appPlataform = "APNS_SANDBOX";
$appAttributes = array(
    "PlatformCredential" => "...",
    "PlatformPrincipal" => "..."
);

$appArn = $sns->createPlatformApplication(array(
    "Name" => $appName,
    "Platform" => $appPlataform,
    "Attributes" => $appAttributes
        ));

Error:

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
Was it helpful?

Solution

There is currently an issue related to this. See https://github.com/aws/aws-sdk-php/issues/136 .

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top