{"action":"opened","issue":{"url":"https://api.github.com/repos/coinbase/coinbase-php/issues/55","labels_url":"https://api.github.com/repos/coinbase/coinbase-php/issues/55/labels{/name}","comments_url":"https://api.github.com/repos/coinbase/coinbase-php/issues/55/comments","events_url":"https://api.github.com/repos/coinbase/coinbase-php/issues/55/events","html_url":"https://github.com/coinbase/coinbase-php/issues/55","id":102223597,"number":55,"title":"Can't Authenticate Using Built-In Functions","user":{"login":"utdrmac","id":4413670,"avatar_url":"https://avatars.githubusercontent.com/u/4413670?v=3","gravatar_id":"","url":"https://api.github.com/users/utdrmac","html_url":"https://github.com/utdrmac","followers_url":"https://api.github.com/users/utdrmac/followers","following_url":"https://api.github.com/users/utdrmac/following{/other_user}","gists_url":"https://api.github.com/users/utdrmac/gists{/gist_id}","starred_url":"https://api.github.com/users/utdrmac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/utdrmac/subscriptions","organizations_url":"https://api.github.com/users/utdrmac/orgs","repos_url":"https://api.github.com/users/utdrmac/repos","events_url":"https://api.github.com/users/utdrmac/events{/privacy}","received_events_url":"https://api.github.com/users/utdrmac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-20T19:58:11Z","updated_at":"2015-08-20T19:58:11Z","closed_at":null,"body":"What am I doing wrong? I'm following the documentation. I'm providing the correct headers but keeps failing.\r\n\r\n```\r\n$configuration = Configuration::apiKey($apiKey, $apiSecret);\r\n$authentication = $configuration->getAuthentication();\r\n\r\n$headers = $auth->getRequestHeaders('GET', '/v2/prices/buy?currency=USD', '');\r\n$headers['CB-VERSION'] = Configuration::DEFAULT_API_VERSION;\r\n\r\n$ch = curl_init();\r\ncurl_setopt($ch, CURLOPT_URL, \"https://api.coinbase.com/v2/prices/buy?currency=USD\");\r\ncurl_setopt($ch, CURLOPT_HTTPHEADER, $headers);\r\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n\r\ncurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);\r\ncurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\r\ncurl_setopt($ch, CURLOPT_CAINFO, __DIR__ . \"/vendor/coinbase/coinbase/etc/ca-coinbase.crt\");\r\n\r\n$response = curl_exec($ch);\r\n\r\nvar_dump($response);\r\n\r\ncurl_close($ch);\r\n```\r\n\r\nThe result, with the headers (replaced a fake access key for posting):\r\n```\r\narray(4) {\r\n  [\"CB-ACCESS-KEY\"]=>\r\n  string(16) \"KJSDKFJLDSFIJ\"\r\n  [\"CB-ACCESS-SIGN\"]=>\r\n  string(64) \"ceb8b94e246b894a9636808640bdd9c2fab3c1b9d16372aff2b184cbbe76bd95\"\r\n  [\"CB-ACCESS-TIMESTAMP\"]=>\r\n  int(1440100264)\r\n  [\"CB-VERSION\"]=>\r\n  string(10) \"2015-07-07\"\r\n}\r\nstring(240) \"{\"errors\":[{\"id\":\"invalid_token\",\"message\":\"The access token is invalid\"}],\"warnings\":[{\"id\":\"missing_version\",\"message\":\"Please supply API version (YYYY-MM-DD) as CB-VERSION header\",\"url\":\"https://developers.coinbase.com/api#versioning\"}]}\"\r\n```\r\n\r\nSo, my headers look correct according to the docs. I'm providing CB-VERSION. I don't get it."}}