title: How to send Extra parameters in payload via Amazon SNS Push Notification
body: <p>This is something new i am asking as i haven't got it any answers for it on SO.</p>
  
  <p>I am using Amazon SNS Push for sending push to my registered devices, everything is working good, i can register devices on my app first start, can send push etc etc. The problem i am facing is that, i want to open a specific page when i open my app through push. I want to send some extra params with the payload but i am not able to do that.</p>
  
  <p>I tried this Link :-
      <a href="http://docs.aws.amazon.com/sns/latest/api/API_Publish.html">http://docs.aws.amazon.com/sns/latest/api/API_Publish.html</a></p>
  
  <p>we have only one key i.e. "Message",  in which we can pass the payload as far as i know.</p>
  
  <p>i want pass a payload like this :- </p>
  
  <pre><code>{
      aps = {
              alert = "My Push text Msg";
            };
      "id" = "123",
      "s" = "section"
  }
  </code></pre>
  
  <p>or any other format is fine, i just wanted to pass 2-3 values along with payload so that i can use them in my app.</p>
  
  <p>The code i am using for sending push is :-</p>
  
  <pre><code>// Load the AWS SDK for PHP
  if($_REQUEST)
  {
      $title=$_REQUEST["push_text"];
  
      if($title!="")
      {
          require 'aws-sdk.phar';
  
  
          // Create a new Amazon SNS client
          $sns = Aws\Sns\SnsClient::factory(array(
              'key'    =&gt; '...',
              'secret' =&gt; '...',
              'region' =&gt; 'us-east-1'
          ));
  
          // Get and display the platform applications
          //print("List All Platform Applications:\n");
          $Model1 = $sns-&gt;listPlatformApplications();
  
          print("\n&lt;/br&gt;&lt;/br&gt;");*/
  
          // Get the Arn of the first application
          $AppArn = $Model1['PlatformApplications'][0]['PlatformApplicationArn'];
  
          // Get the application's endpoints
          $Model2 = $sns-&gt;listEndpointsByPlatformApplication(array('PlatformApplicationArn' =&gt; $AppArn));
  
          // Display all of the endpoints for the first application
          //print("List All Endpoints for First App:\n");
          foreach ($Model2['Endpoints'] as $Endpoint)
          {
            $EndpointArn = $Endpoint['EndpointArn'];
            //print($EndpointArn . "\n");
          }
          //print("\n&lt;/br&gt;&lt;/br&gt;");
  
          // Send a message to each endpoint
          //print("Send Message to all Endpoints:\n");
          foreach ($Model2['Endpoints'] as $Endpoint)
          {
            $EndpointArn = $Endpoint['EndpointArn'];
  
            try
            {
              $sns-&gt;publish(array('Message' =&gt; $title,
                      'TargetArn' =&gt; $EndpointArn));
  
              //print($EndpointArn . " - Succeeded!\n");
            }
            catch (Exception $e)
            {
              //print($EndpointArn . " - Failed: " . $e-&gt;getMessage() . "!\n");
            }
          }
      }
  }
  ?&gt;
  </code></pre>
  
  <p>Any help or idea will be appreciated. Thanks in advance.</p>