Problems with SEOshop / API-PHP-Client

rsirotarsirota Member Posts: 94

I downloaded the php SEOShop and it was working, not I get an error that states invalid login. But I am using the same as I do with postman.

<?php

include_once 'src/WebshopappApiClient.php';


//cluster_id is the location where the shop is hosted


$api = new WebshopappApiClient('us1', 'df924a0af21fb8e07e8d795de2e3****

', '7384f7e65aa4f57d69cb36aa9a09****

', 'us');


$shopInfo = $api->shop->get();


echo '<pre>';

print_r($shopInfo);

echo '</pre>';

I get the following message:

Fatal error: Uncaught WebshopappApiException: Invalid login credentials. in /home/customer/www/sirota-consulting.com/public_html/PPLG/src/WebshopappApiClient.php:590 Stack trace: #0 /home/customer/www/sirota-consulting.com/public_html/PPLG/src/WebshopappApiClient.php(781): WebshopappApiClient->checkLoginCredentials() #1 /home/customer/www/sirota-consulting.com/public_html/PPLG/src/WebshopappApiClient.php(927): WebshopappApiClient->sendRequest('shop', 'get', Array) #2 /home/customer/www/sirota-consulting.com/public_html/PPLG/src/WebshopappApiClient.php(5656): WebshopappApiClient->read('shop') #3 /home/customer/www/sirota-consulting.com/public_html/PPLG/eComTest.php(10): WebshopappApiResourceShop->get() #4 {main} thrown in /home/customer/www/sirota-consulting.com/public_html/PPLG/src/WebshopappApiClient.php on line 590

and line 590 is

    if (strlen($this->getApiKey()) !== 32 || strlen($this->getApiSecret()) !== 32)

    {

      throw new WebshopappApiException('Invalid login credentials.');

but they are 32 chars long.

Tags:

Answers

Sign In or Register to comment.