Read the file [login to view URL] (attached) the code is for an API, it is a form that retrieves information the user inputs and the code creates a POST request to an endpoint.
The problem is the code needs to call for the latest access token.
When the code attached gets accounts with code:
// Getting accounts
$params = [
CURLOPT_HEADER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_URL => $api_end_point.'connect/partner',
CURLOPT_HTTPHEADER => [
'Content-Type: application/x-www-form-urlencoded',
],
CURLOPT_POSTFIELDS => 'response_type=accounts&client_id=y3tgh6qmhzhubhm5owin6znr4i&client_secret=ytvk2ttbnecebfbs4tbxr4rzuitdm5fhwbokmuxhiusnfdksoite&scope=partner_jobboard',
];
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt_array($curl, $params);
$resultAccs = curl_exec($curl);
$resultAccs = json_decode($resultAccs);
You need to get the access token after, which is the following code:
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "[login to view URL]",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "client_id= y3tgh6qmhzhubhm5owin6znr4i&client_secret= ytvk2ttbnecebfbs4tbxr4rzuitdm5fhwbokmuxhiusnfdksoite &grant_type=partner_actas&scope=partner_jobboard&actas={AN_ACCOUNT_FROM_ABOVE}",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
You then plug the access token retrieve from this, to the POST request.
The code is already done, all you have to do is put it in the right place and plug the result into the Access Token part. VERY EASY JOB.
SO I know you have read this you need to start your proposal with Hello Anthony.
Hello Anthony
I think, I have a solution and it just needs to be tested. Can you contact me? If my code will work, we will start a project. If no, it will be free for you
$20 AUD om 1 dag
5,0 (1 omtale)
1,2
1,2
3 frilansere byr i gjennomsnitt $22 AUD for denne jobben
Hi,
Greeting of day.
I being a WebExpert, with over 7 year's of experience in Web development (i.e, Symfony3, Symfony2, Symfony1,Laravel,Codeigniter, wordpress)
I can assure you to provide 100% of quality work with delivery in time.
As I am also familiar with the 3rd party extension integrations and other development works.
moreover all my clients are satisfied with my service
You will see just my reviews all client give me 5 start :)