#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Posts
    114
    Rep Power
    41

    SSL certificate problem


    Hello all,

    I am trying to access Commission Junction's API via a REST request. When I run the code below I get this error: "Curl error: SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed "

    My computer is running Apache, PHP and MySQL through WAMP. Is it possible that I don't have something in either PHP or Apache that I need to turn on? I have scoured the internet for hours and can't find an answer to this question.

    Here is information regarding REST request from Commission Junction's website
    http://help.cj.com/en/web_services/web_services.htm#product_catalog_search_service_rest.htm

    PHP Code:
    <?php $url "https://product-search.api.cj.com/v2/product-search?website-id=XXXXXXX&advertiser-ids=1566996&serviceable-area=US&advertiser-sku=210790596&keywords=&currency=USD";   $ch curl_init(); $CJ_KEY ='00bc6addff460bdfb61689a6b153deca753cad4b171931e2bd715099f511dbe1f72944588882ba974f7be7a7490faad8f034209a4c5bb9f510bbcf1a3f3b4a7a77/0090be60307cf51e34d9f78110f4e7500ce442144f785174682826cd3f112b23d8d44136d0f9b5b48ea8089521ec76e295dc50e1b2fa7754e2bb8905c05e152071'curl_setopt($chCURLOPT_URL$url); curl_setopt($chCURLOPT_POSTFALSE); curl_setopt($chCURLOPT_RETURNTRANSFERTRUE); curl_setopt($chCURLOPT_HTTPHEADER, array('Authorization: ' $CJ_KEY)); $curl_results curl_exec($ch);   $info simplexml_load_string($curl_results); print_r($info); echo "Curl error: " curl_error($ch?>
    Last edited by NewWEBdesigner; August 30th, 2009 at 11:09 AM. Reason: confused WINAMP with WAMP
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2007
    Posts
    114
    Rep Power
    41
    It works! thank you for your help.
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2013
    Posts
    1
    Rep Power
    0

    curl GET method with developer key


    You can use following curl GET method as well:

    curl -G -H "Authorization:00c493a8454f391ceb9561971842c993bca21dd87196ca73d0ebcb963cfb167b7d1701f314a7043c5f334 0b99b4f6bd6a33bab76db4b1e2ab28a7e6940979c5afd/452a3af3a00b555ca2a3c2b8fb8ed75770a715a7e9c973f497727b7b1b516ec317bdcc94198b35dfc179b3318aca35a6e5ea efdadd5eb323e0574de26291d6b5" -d "date-type=event" -d "start-date=2013-01-23" -d "end-date=2013-01-24" URL

IMN logo majestic logo threadwatch logo seochat tools logo