<p>The secret can be anything you want it to be. It's intended to prevent malicious users from running your callback URL manually. </p>

<p>Your callback will do a check similar to:</p>

<pre><code>if ($secret !== "mycoolsecret") { die (); }
</code></pre>

CC BY-SA 3.0
2017-04-28T11:50:33.840Z
2017-04-28T11:50:33.840Z
m1xolyd1an
<pre><code>$blockchain_receive_root = "https://api.blockchain.info/";
$mysite_root = "mysite url";
$secret = "CHANGE_TO_RANDOM_SECRET";
$my_xpub = "CHANGE_TO_XPUB_KEY";
$my_api_key = "CHANGE_TO_API_KEY";
</code></pre>

<p>I have api key and xpub key but how to set the random secert key</p>

<blockchain.info><random>
bitcoin random key
cibi
# bitcoin random key

(Asked by: username_0 on 2017-04-27)

$blockchain_receive_root = "https://api.blockchain.info/";
$mysite_root = "mysite url";
$secret = "CHANGE_TO_RANDOM_SECRET";
$my_xpub = "CHANGE_TO_XPUB_KEY";
$my_api_key = "CHANGE_TO_API_KEY";

I have api key and xpub key but how to set the random secert key

**Tags:** blockchain.info, random


---

## 1 answers

### Answer by username_1 on 2017-04-28. Score: 0

The secret can be anything you want it to be. It's intended to prevent malicious users from running your callback URL manually. 
Your callback will do a check similar to:
if ($secret !== "mycoolsecret") { die (); }


---

