---
title: "How to Get Customer Information Using SOAP API in Magento 2"
url: "https://magecomp.com/blog/get-customer-information-using-soap-api-magento-2/"
date: "2022-01-10T12:33:54+00:00"
modified: "2025-02-20T06:21:09+00:00"
author:
  name: "Dhiren Vasoya"
  url: "https://magecomp.com/"
categories:
  - "How To"
  - "Magento 2"
word_count: 247
reading_time: "2 min read"
summary: "Hello Magento Friends,"
description: "When you need customer information outside the Magento platform, using SOAP API is the great option. Learn more"
keywords: "How To, Magento 2"
language: "en"
schema_type: "Article"
related_posts:
  - title: "Magento 2: How to Write Translatable String in Email, PHTML, UiComponents,Js"
    url: "https://magecomp.com/blog/write-translatable-string-email-phtml-uicomponents-js-in-magento-2/"
  - title: "How to transfer your Customers from Magento 1.x to Magento 2"
    url: "https://magecomp.com/blog/transfer-customers-magento-1-x-magento-2/"
  - title: "How to Create Indian GST Tax Rule in Magento 2?"
    url: "https://magecomp.com/blog/create-indian-gst-tax-rule-magento-2/"
---

# How to Get Customer Information Using SOAP API in Magento 2

_Published: January 10, 2022_  
_Author: Dhiren Vasoya_  

![How to Get Customer Information Using SOAP API in Magento 2](https://magecomp.com/blog/wp-content/uploads/2022/01/How-to-Get-Customer-Information-Using-SOAP-API-in-Magento-2-1024x512.webp)

**Hello Magento Friends,**

Today I am going to explain How to obtain Customer Details Using SOAP API in Magento 2.
[![Magento version upgrade](https://magecomp.com/blog/wp-content/uploads/2025/02/Magento-2-Version-Upgrade-CTA-3.webp)](https://magecomp.com/services/magento-upgrade-services/)

SOAP API allows web applications to communicate across the internet and HTTP which is supported by all the browsers and servers. SOAP API provides easy data transfer between external systems and Magento 2.
When you need customer data outside the Magento platform, you can accomplish it using SOAP API. Let’s learn How to Get Customer Information Using SOAP API in Magento 2.
## Steps to Get Customer Information Using SOAP API in Magento 2:
**Step 1:** Create **call_soap.php** file anywhere and add the following code
```
<?php
$request = new SoapClient("http://yourdomain/soap/?wsdl&services=integrationAdminTokenServiceV1", array("soap_version" => SOAP_1_2));
// changed your store url.
$token = $request->integrationAdminTokenServiceV1CreateAdminAccessToken(array("username"=>"admin", "password"=>"admin@1234"));

$request = new SoapClient(
    'http://yourdomain/soap/default?wsdl&services=customerCustomerRepositoryV1',
    array(
        'soap_version' => SOAP_1_2,
        'stream_context' => stream_context_create(array(
            'http'=> array('header' => 'Authorization: Bearer '.$token->result)
        ))
    )
);
// you need pass customer id in array
$response = $request->customerCustomerRepositoryV1GetById(array("customerId" => 3));
echo "";
print_r($response);
echo "";
?>
```

## [![Magento 2 Speed & Performance Optimization Services](https://magecomp.com/blog/wp-content/uploads/2023/10/Magento-2-Speed-Performance-Optimization-Services-CTA-4.webp)](https://magecomp.com/magento-performance-optimization.html)

## Conclusion:
Hence, this was about fetching customer details using SOAP API in Magento 2. Similarly, **Get Order Information Using SOAP API in Magento 2**. If you face any challenges, get in touch with me through the comment part. Share the article with others and see you in the next article.
[![hyva theme development](https://magecomp.com/blog/wp-content/uploads/2025/02/hyva-theme-development-CTA-2.webp)](https://magecomp.com/services/hyva-theme-development/)

**Happy Coding!**


---

_View the original post at: [https://magecomp.com/blog/get-customer-information-using-soap-api-magento-2/](https://magecomp.com/blog/get-customer-information-using-soap-api-magento-2/)_  
_Served as markdown by [Third Audience](https://github.com/third-audience) v3.5.3_  
_Generated: 2026-10-08 06:39:15 UTC_  
