Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Is there a Customer Login API

Solved

Is there a Customer Login API

_chath_s_
Tourist
5 0 6

Hi,

 

I am trying to create a mobile app that connects to the storefront API and allows users to purchase items. 

The app has a login function, and I was wondering if shopify has an API for customer Login? Or is this something that needs to be handled on our server side, and use multipass to connect with shopify a user?

Additionally, does shopify support push notifications on order confirmations, order shipments etc.? 

Accepted Solution (1)
lramhudda
Shopify Partner
10 1 4

This is an accepted solution.

Replies 4 (4)

lramhudda
Shopify Partner
10 1 4

// Login Match

Storefront-Access-Token from app admin site
Email
Password
Shop URL

Just update your details and copy paste work 

its work fine


$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://djsoundss.myshopify.com/api/2022-01/graphql.json',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{"query":"mutation SignInWithEmailAndPassword(\\n $email: String!, \\n $password: String!,\\n) {\\n customerAccessTokenCreate(input: { \\n email: $email, \\n password: $password,\\n }) {\\n customerAccessToken {\\n accessToken\\n expiresAt\\n }\\n customerUserErrors {\\n code\\n message\\n }\\n }\\n}","variables":{"email":"lram@mtoag.com","password":"123456"}}',
CURLOPT_HTTPHEADER => array(
'X-Shopify-Storefront-Access-Token: 8b330934c14b539fe97e4a7dc6bdd8f3',
'Content-Type: application/json'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

lramhudda
Shopify Partner
10 1 4

This is an accepted solution.

_chath_s_
Tourist
5 0 6

This is great. thanks a bunch!

Did you also do a registration with a social login? 

cms1209
New Member
4 0 0

did you find any solution to the social login for the customer using a mobile application?