Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: azaarps on December 12, 2023, 11:46:43 AM



Title: How request api blockchain 2023 ?
Post by: azaarps on December 12, 2023, 11:46:43 AM
The link does not work to request the API   :'( https://www.blockchain.com/api/request


I want to apply to api

is there a solution



<?php
$api_key = "api"; /your api
$xpub = "xpub"; /your xpub
$secret = "your_secret"; //this can be anything you want
$rootURL = "your site"; $orderID = uniqid();  /your web site
$callback_url = $rootURL."/callback.php?invoice=".$orderID."&secret=".$secret;
$receive_url = "https://api.blockchain.info/v2/receive?key=".$api_key."&xpub=".$xpub."&callback=".urlencode($callback_url);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_URL, $receive_url);
$ccc = curl_exec($ch);
$json = json_decode($ccc, true);
$payTo = $json['address'];
echo $payTo; // The API places you where your random address will appear.
?>


Title: Re: How request api blockchain 2023 ?
Post by: DaveF on December 12, 2023, 11:56:32 AM
Are you looking to try to scam again?


https://talkimg.com/images/2023/12/12/ETPQo.png



Did you follow this guide: https://exchange.blockchain.com/api/#introduction

You have be logged into your blockchain.com account before you can request your API key.

Also, are you locked into blockchain.com for any reason? There are a lot of other services that also allow API access.

-Dave


Title: Re: How request api blockchain 2023 ?
Post by: hugeblack on December 12, 2023, 12:26:20 PM
You need to create a callback.php file and then log in to your blockchain account, Fill out form and click “Create New API Key Now” and then continue what you need ----> here https://api.blockchain.com/v3/, after that updat index.php and callback.php
blockchair.com has a better API