question

sali-312019 avatar image
0 Likes"
sali-312019 asked

unable to get user token

I'm getting the error message Couldn't resolve host ' api.sandbox.ebay.com'.... $endpoint = ' https://api.sandbox.ebay.com/identity/v1/oauth2/token'; $request = http_build_query(array("grant_type" => "authorization_code", "code" => urlencode($_GET['code']), "redirect_uri" => $ruName)); $headers = array('Content-Type: application/x-www-form-urlencoded', 'Authorization: Basic '.base64_encode($appID.":".$certID)); $session = curl_init(); curl_setopt_array($session, array(CURLOPT_URL => $endpoint, CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_POSTFIELDS => $request, CURLOPT_HTTPHEADER => $headers)); $response = curl_exec($session); $err = curl_error($session); curl_close($session);
user token
10 |600

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.