in reply to Re: Coinbase API
in thread Coinbase API

I was messing with this too. Couple questions/considerations.

/products has no signature/request requirements. It responds with full data successfully with a bare GET.

Their spec says two things about dates. All timestamp are returned in ISO8601 format in UTC with fields ending in postfix _at. Example: "created_at": "2015-07-01T00:55:47Z" but also The CB-ACCESS-TIMESTAMP header MUST be number of seconds since Unix Epoch. When I change your code to try /user instead of /products this is the response–

{"message":"invalid timestamp"}

Replies are listed 'Best First'.
Re^3: Coinbase API
by hippo (Archbishop) on Jul 05, 2018 at 09:01 UTC

    Good spot! I'm not even passingly familiar with this particular API so only skimmed enough of the docs to spot potential problems. I'm sure ownlifeful will know more about what is actually required.

    Backing out my timestamp changes and trying /user as the path I now get

    {"message":"Invalid API Key"}

    which could just be because the key isn't allowed access to that path or the key is incorrect or badly manipulated or ...

    Hopefully this gives ownlifeful something to go on, anyway.

      Nice. That's where I landed too, Invalid...

      It's fun. I like this kind of code and you helped me jump in easily on this one.

      Yes, now I do have something to go on. I can't thank you enough. :)

      You might be getting "Invalid API Key" messages, because I revoked that particular key on Coinbase.