JSON post request help

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • denimen.
    Junior Member
    • Feb 2013
    • 14

    #1

    JSON post request help

    Greetz,

    Im having some problem with the new api and can anyone please try to help on this one..

    I get the session token via global wsdl using soap.
    I use the session token with the application key that I got from the betfair.

    PHP Code:
    $url="https://beta-api.betfair.com/rest/v1.0/listEventTypes/";
    $curl curl_init($url);
    curl_setopt($curlCURLOPT_HEADERtrue);
    curl_setopt($curlCURLOPT_RETURNTRANSFERtrue);
    curl_setopt($curlCURLOPT_HTTPHEADER,
    array(
    "X-Application: $appKey","X-Authentication: $token","content-type: application/json"));
    curl_setopt($curlCURLOPT_SSL_VERIFYPEER,0);
    curl_setopt($curlCURLOPT_POSTtrue);
    curl_setopt($curlCURLOPT_POSTFIELDS'{"filter":{ }}');
    $file curl_exec($curl);
    curl_close($curl);

    echo
    "<pre>"print_r($file); 
    Since I'm new to sending post request and also with the json format can anyone explain this error and maybe give me a little hint on how to move on with this.

    error: {"detail":{"exceptionname":"APINGException","APING Exception":{"errorDetails":"Forbidden : DSC-0037","errorCode":"UNEXPECTED_ERROR","requestUUID" :"prdang001-02191007-000005f5f5"}},"faultcode":"Client","faultstring":" ANGX-0006"}


    Thanks, Denis
Working...
X