Login with email and password using Admin api

Yurii
New Member
5 0 0

41 minutes ago

Hi,

I created customer using this api - POST /admin/customers.json(https://help.shopify.com/api/reference/customer#index), and I am not sure how to login with that credentials(email and password). There is an api to get the customer info with customer id.

I tried to find a solution, but nothing yet..

Is it possible to login with email and password using admin api? 

Sincerely,

-Yurii

0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 194

Hi Yurii, 

We don't have any methods available currently to enable you to do this, unfortunately. 

Yurii
New Member
5 0 0

Then is it possible by storefront api?

Can you tell me why admin api is impossible, please?

 

0 Likes
Yurii
New Member
5 0 0

Hi,

Please let me know asap

 

-Yurii

0 Likes
Yurii
New Member
5 0 0

Hi Josh,

 

Please let me knjow if it is possible by storefront api.

Can you tell me why admin api is impossible, please?

0 Likes
Josh
Shopify Staff
Shopify Staff
1131 82 194

Yes it would be possible with the Storefront API, though I don't have direct experience with doing so : https://help.shopify.com/api/storefront-api/guides/updating-customers

I don't think a customer login would fit within the scope of actions we would want taking place via the Admin API.

0 Likes
routiejin
New Member
1 0 0

Hello, I am zhenqiang and beginner of Shopify API development.

I also encountered this problem.

I have to check customer's login email and password for checking customer's validation.

Did you solve this problem?

If so, please let me know that method.

Waiting for your response.

Regards.

0 Likes
DGP
Tourist
10 0 3

What you're looking to do here would be a customerAccessTokenCreate mutation in the storefront graphql API. This lets you provide an email/password and will give you a valid access token. The usual use case for this is a native mobile app to do a login. Once you have that access token, you can use that in a couple ways - to associate that customer with the checkouts you create, and also if you use some webviews in your app, you can pass that access token as a certain header in your embedded browser so that the shopify site will also register them as logged-in.

0 Likes