Category : rest

I am having an error here it says that I have "Uncaught ArgumentCountError", but I am just following a tutorial and it has no error, but when I run it it does. This is error I got Fatal error: Uncaught ArgumentCountError: define() expects at least 2 arguments, 1 given in C:xampphtdocsphprestcoreinitialize.php:3 Stack trace: #0 C:xampphtdocsphprestcoreinitialize.php(3): ..

Read more

I’m trying to retrieve a contact in Intercom through their REST API. I’m using the following code but I get the following error : CODE try { $postdataarray[‘query’] = [ "field" => "email","operator" => "=","value" => $value[’email’]]; $postData = json_encode($postdataarray); $postHeader = [ ‘Authorization:Bearer ergergergergergergergerg’, ‘Accept: application/json’, ‘Content-Type: application/json -d’ ]; $curl = curl_init("https://api.intercom.io/contacts/search/"); curl_setopt($curl, ..

Read more

I am trying to create an API. The problem is that it’s working when use a simple form to post the data to the URL but it doesn’t work with my CURL code. With CURL it returns Invalid Parameters message. Working Form Method <form method="post" action="https://hrtaskapi.dhwaniris.in/index.php/api/user/login"> <input type="text" name="username" value="1412" class="form-control"> <input type="text" name="password" value="142487" ..

Read more