grazie ancora forse ci siamo.
Come sei riuscito a trovare l'ID???
Ho inserito nel modulo il seguente codice:
{source}
<?php
// Set my API key and secret token.
$api_key = '5003520e8a003612049a811c7279259d3128fbeafa6d90ae267bf7786e92ef82
';
$secret = '9262c2a2dd85f177e5b30e5e4628da0b2ca38a90d92e84f3e4320aabe6f0a90d
';
// Set my authorization key for petition with Change.org ID 12345.
$petition_auth_key = 'my_petition_auth_key';

$petition_id = 7116479;

// Set up the endpoint and URL.

$base_url = "
https://api.change.org";

$endpoint = "/v1/petitions/$petition_id/signatures";

$url = $base_url . $endpoint;

// Set up the signature parameters.

$parameters = array();

$parameters['api_key'] = $api_key;

$parameters['timestamp'] = gmdate("Y-m-d\TH:i:s\Z"); // ISO-8601-formtted timestamp at UTC

$parameters['endpoint'] = $endpoint;

$parameters['source'] = 'test.com';

$parameters['email'] = 'person@example.com';

$parameters['first_name'] = 'John';

$parameters['last_name'] = 'Doe';

$parameters['address'] = '1 Market St';

$parameters['city'] = 'Philadelphia';

$parameters['state_province'] = 'PA';

$parameters['postal_code'] = '19144';

$parameters['country_code'] = 'US';

// Build request signature.

$query_string_with_secret_and_auth_key = http_build_query($parameters) . $secret . $petition_auth_key;


// Add the request signature to the parameters array.

$parameters['rsig'] = hash('sha256', $query_string_with_secret_and_auth_key);

// Create the request body.

$data = http_build_query($parameters);

// POST the parameters to the petition's signatures endpoint.

$curl_session = curl_init();

curl_setopt_array($curl_session, array(

CURLOPT_POST => 1,

CURLOPT_URL => $url,

CURLOPT_POSTFIELDS => $data

));

$result = curl_exec($curl_session);

// Output the returned JSON result.

echo $result;
?>
{/source}
qui non saprei cosa inserire
$petition_auth_key =
'my_petition_auth_key';
Ovviamente ancora nulla, anzi il seguente errore nel modulo:
{"result":"failure","messages":["authorization key cannot be found or is not granted"]}1
Grazie ancora