Find Jobs
Hire Freelancers

Fix this code -

$10-30 AUD

Completed
Posted over 5 years ago

$10-30 AUD

Paid on delivery
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.
Project ID: 17999562

About the project

3 proposals
Remote project
Active 6 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
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 in 1 day
5.0 (1 review)
1.2
1.2
3 freelancers are bidding on average $22 AUD for this job
User Avatar
Hello Anthony I can handle it Thanks
$35 AUD in 1 day
4.6 (149 reviews)
6.4
6.4
User Avatar
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 :)
$10 AUD in 1 day
4.9 (68 reviews)
5.3
5.3

About the client

Flag of AUSTRALIA
Sydney, Australia
5.0
24
Payment method verified
Member since Oct 5, 2015

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.