Hello!, i am develoing an app such as Android and IOS for my store in React Native! The UI is almost completed. I also fetch collections and products successfully. However I do not see any documantations about Customer Login & sign up etc. Please help me in this case. How can i login and signup via API in my app. Thanks
You should look at Manage customer accounts with the Storefront API (shopify.dev)
Hope this helps
const query = mutation customerAccessTokenCreate($input: CustomerAccessTokenCreateInput!) { customerAccessTokenCreate(input: $input) { customerAccessToken { accessToken expiresAt } customerUserErrors { code field message } } }
const input = {
“email”: “irfanarain4732@gmail.com”,
“password”: “47326aA!”
}
fetch(‘https://my-store.myshopify.com/api/2021-11/graphql.json’, {
method: ‘POST’,
headers: {
“Accept”: “application/json”,
“Content-Type”: “application/graphql”,
‘X-Shopify-Storefront-Access-Token’: ${'1cae472845925d32bb76a49069c3ca7a'}
},
body: query,
variables: JSON.stringify(input),
})
.then(res => res)
.then(data => console.log(“Data”,data))
i,m trying something like this. But i couldn,t get the desired result. Please help me how can i get appropriate response.