mrteye / GDAX

API for GDAX: A service provided by Coinbase. (Unofficial API)
MIT License
18 stars 5 forks source link

enable cookies #7

Closed kishan93 closed 6 years ago

kishan93 commented 6 years ago

`<?php require_once DIR ."/app/config.php";

use mrteye\Gdax\Api as Api; use mrteye\Gdax\Auth as Auth;

// Get the GDAX API and start making calls. $gdax = new Api('https://api-public.sandbox.gdax.com'); $products = false;

try { // Example usage of public calls. $products = $gdax->getProducts();

} catch (\Exception $e) { // echo $e->getMessage(); echo '

'. print_r($gdax->getError(), true) .'
'; }

if ($products) { echo 'Products:

'. print_r($products, true) .'
'; } else { echo 'Something went wrong.'; } ?>`

output

[response_headers] => Array

  | (   | [0] => HTTP/1.1 403 Forbidden   | [1] => Date: Fri, 02 Feb 2018 07:18:11 GMT   | [2] => Content-Type: text/html; charset=UTF-8   | [3] => Transfer-Encoding: chunked   | [4] => Connection: close   | [5] => Set-Cookie: __cfduid=d5ad71640c2fa26b4e3a3a25245e4d5a31517555891; expires=Sat, 02-Feb-19 07:18:11 GMT; path=/; domain=.gdax.com; HttpOnly   | [6] => CF-Chl-Bypass: 1   | [7] => Cache-Control: max-age=2   | [8] => Expires: Fri, 02 Feb 2018 07:18:13 GMT   | [9] => X-Frame-Options: SAMEORIGIN   | [10] => Strict-Transport-Security: max-age=15552000; includeSubDomains; preload   | [11] => X-Content-Type-Options: nosniff   | [12] => Expect-CT: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"   | [13] => Server: cloudflare   | [14] => CF-RAY: 3e6b60001e4269e9-LHR   | )

Please enable cookies.

One more step

Please complete the security check to access api-public.sandbox.gdax.com

Why do I have to complete a CAPTCHA?

Completing the CAPTCHA proves you are a human and gives you temporary access to the web property.

What can I do to prevent this in the future?

If you are on a personal connection, like at home, you can run an anti-virus scan on your device to make sure it is not infected with malware.

If you are at an office or shared network, you can ask the network administrator to run a scan across the network looking for misconfigured or infected devices.

Cloudflare Ray ID: 3e6b60001e4269e9
•
Your IP: 182.72.146.186
•
Performance & security by Cloudflare
mrteye commented 6 years ago

Here is what I have found.

Reddit https://www.reddit.com/r/GDAX/comments/7km34g/gdax_api_behind_cloudflare_asking_for_captcha_403/

Support cloud flare https://support.cloudflare.com/hc/en-us/articles/203366080-Why-do-I-see-a-captcha-or-challenge-page-Attention-Required-trying-to-visit-a-site-protected-by-Cloudflare-as-a-site-visitor-

Honeypot http://www.projecthoneypot.org/ip_182.72.146.186

Looks like you IP has been flagged. If you have further information, please distinguish between your words and the output you are seeing. If you have not done so already please use your own words to frame the issue.

Let me know if you find anything else out. Any reference material you can provide would be useful.