1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problems with Setup for API Calls

Discussion in 'Keyword Tracker' started by Cheree Dohmann, Oct 4, 2016.

  1. #1
    Hello, I am trying to get the API calls to work with my DigitalPoint Keyword Tracker tool, but not sure what I'm doing wrong. I setup an API with Google, I created my PHP file with the code below. Not sure what I am missing, feel like I am missing a step somewhere. I am pretty techie, but I am not a programmer. Could use some guidance.
    Please take a peek at my PHP code below. I am not sure how to retrieve my returned data set. Kinda confused. Can you point me in the right direction? Thanks.

    <?php

    $expires = time() + 300;
    $signature = base64_encode(hash_hmac('sha1', 877946 . '-' . $expires, 620c06bf2aae896770d86bc437268d92, true));
    $request = http_build_query(
    array (
    'group_id' => 1
    )
    , '', '&');
    $ch = curl_init('https://api.digitalpoint.com/v1/tools/tracker-keywords.json?' . $request);
    curl_setopt_array($ch, array(
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => array(
    "Auth-Access-Id: $accessId",
    "Auth-Signature: $signature",
    "Auth-Expires: $expires"
    )
    ));
    $results = json_decode(curl_exec($ch));
    curl_close($ch);

    ?>
    SEMrush

    When I go to this link:
    https://api.digitalpoint.com/v1/tools/tracker-keywords.json?
    I get this error message:
    {"results":{"error":"Signature expired."},"code":401}

    Have no idea what to do with this. HELP! :)
     
    Cheree Dohmann, Oct 4, 2016 IP
    SEMrush
  2. digitalpoint

    digitalpoint Overlord of no one Staff

    Messages:
    38,117
    Likes Received:
    2,578
    Best Answers:
    457
    Trophy Points:
    710
    Digital Goods:
    29
    #2
    That error is coming from the Google API. I'd double check your API credentials.
     
    digitalpoint, Oct 5, 2016 IP