{"id":3044,"date":"2014-03-15T02:03:59","date_gmt":"2014-03-15T02:03:59","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/call-to-magento-soap-api-expires-immediately-collection-of-common-programming-errors\/"},"modified":"2022-08-30T15:50:19","modified_gmt":"2022-08-30T15:50:19","slug":"call-to-magento-soap-api-expires-immediately-collection-of-common-programming-errors","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2014\/03\/15\/call-to-magento-soap-api-expires-immediately-collection-of-common-programming-errors\/","title":{"rendered":"call to magento soap api expires immediately-Collection of common programming errors"},"content":{"rendered":"<p>I&#8217;m trying to do a call to the magento api to get the details of a specific customer. When I do this call I always get the following error:<\/p>\n<pre><code>PHP Fatal error:  Uncaught SoapFault exception: [5] Session expired. Try to relogin. in     \/var\/www\/magento-client\/magento-customer.php:12\nStack trace:\n\/var\/www\/magento-client\/magento-customer.php(12): SoapClient-&gt;__call('call', Array)\n\/var\/www\/magento-client\/magento-customer.php(12): SoapClient-&gt;call('a1a6863c7dadd95...', 'customer.info', 3)\n{main}\n  thrown in \/var\/www\/magento-client\/magento-customer.php on line 12\n<\/code><\/pre>\n<p>I have a valid api user in the backend, the api session timeout in the backend is set to 9999999999999, and I&#8217;ve even tried to override the isSessionExpired function in the magento core code, but nothing works.<\/p>\n<p>The code is as follows:<\/p>\n<pre><code>$url = 'http:\/\/magentourl\/api\/soap\/?wsdl';\n$apiUser = \"user\";\n$apiPass = \"password\";\n\n$proxy = new SoapClient($url);\n\n$sessionId = $proxy-&gt;login($apiUser, $apiPass);\n\n\/\/ Get new customer info\nvar_dump($sessionId);\nvar_dump($proxy-&gt;call($sessionId, 'customer.info', 3));\ndie();\n<\/code><\/pre>\n<p>Does anyone have any ideas what the problem could be?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;m trying to do a call to the magento api to get the details of a specific customer. When I do this call I always get the following error: PHP Fatal error: Uncaught SoapFault exception: [5] Session expired. Try to relogin. in \/var\/www\/magento-client\/magento-customer.php:12 Stack trace: \/var\/www\/magento-client\/magento-customer.php(12): SoapClient-&gt;__call(&#8216;call&#8217;, Array) \/var\/www\/magento-client\/magento-customer.php(12): SoapClient-&gt;call(&#8216;a1a6863c7dadd95&#8230;&#8217;, &#8216;customer.info&#8217;, 3) {main} thrown in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,1],"tags":[],"class_list":["post-3044","post","type-post","status-publish","format-standard","hentry","category-magento","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=3044"}],"version-history":[{"count":1,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3044\/revisions"}],"predecessor-version":[{"id":9028,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/3044\/revisions\/9028"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=3044"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=3044"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=3044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}