question

deesha-3642 avatar image
0 Likes"
deesha-3642 asked ·

API request not working

Hi, We have used the API call to search the product according to the keyword. My request is as below: // API request variables $endpoint = ' http://svcs.ebay.com/services/search/FindingService/v1'; $version = '1.0.0'; // API version supported by your application $appid = 'My API'; // Replace with your own AppID $globalid = 'EBAY-US'; $query = 'harry potter'; // You may want to supply your own query $safequery = urlencode($query); // Make the query URL-friendly // Construct the findItemsByKeywords HTTP GET call $apicall = "$endpoint?"; $apicall .= "OPERATION-NAME=findItemsByKeywords"; $apicall .= "&SERVICE-VERSION=$version"; $apicall .= "&SECURITY-APPNAME=$appid"; $apicall .= "&GLOBAL-ID=$globalid"; $apicall .= "&keywords=$safequery"; $apicall .= "&paginationInput.entriesPerPage=3"; // Load the call and capture the document returned by eBay API $resp = simplexml_load_file($apicall); echo "
";
        print_r($resp);
        echo "
"; // // Check to see if the request was successful, else print an error if ($resp->ack == "Success") { // $results = ''; // // If the response was loaded, parse it and build links foreach($resp->searchResult->item as $item) { $pic = $item->galleryURL; $link = $item->viewItemURL; $title = $item->title; // // For each SearchResultItem node, build a link and append it to $results $results .= " $title"; } } // If the response does not indicate 'Success,' print an error else { $results = "

Oops! The request was not successful. Make sure you are using a valid "; $results .= "AppID for the Production environment.

"; } And simplexml_load_file() is giving me error. message: "simplexml_load_file(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0" exception: "ErrorException" Any solution will be appreciated. Thank you
keyword search failing
10 |600 characters needed characters left characters exceeded

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

anisha_developersupport avatar image
1 Like"
anisha_developersupport answered ·
Hi @deesha-3642, We recommend you to use newer version of the Finding API, The eBay Finding API will work over HTTPS . Any requests submitted via HTTP will not work accordingly, and please confirm using this resolves your problem. Please go through link:- https://developer.ebay.com/news/https-only-finding-api Before you update your application to use the documented HTTPS endpoints, check the following: • Ensure your application hosting platform/provider supports HTTPS • Test the HTTPS connection You can also refer to this knowledge base article on how to make https call and debug SSL handshake. Link:- https://ebaydts.com/eBayKBDetails?KBid=5113 The requirement to use HTTPS only will apply to both sandbox and production environments. Both environments support HTTPS currently, so either can be used for testing. We appreciate your help in continuing to ensure eBay is a secure and trusted marketplace. Best Regards, eBay Developer Support
· Share
10 |600 characters needed characters left characters exceeded

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

eram_developersupport avatar image
0 Likes"
eram_developersupport answered ·
Hi @deesha-3642, Please refer the below doc for Making Call samples: https://developer.ebay.com/Devzone/finding/CallRef/index.html https://developer.ebay.com/Devzone/finding/Concepts/MakingACall.html Hope this helps you!!!! Best Regards, eBay Developer Support
· Share
10 |600 characters needed characters left characters exceeded

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

deesha-3642 avatar image
0 Likes"
deesha-3642 answered ·
Hi @anisha_developersupport, Thank you for the response. It would be a great help if you send me the request that I can use in PHP or framework like laravel. The link you have sent is for java. Thank you
· Share
10 |600 characters needed characters left characters exceeded

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

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.