New Shopify Certification now available: Liquid Storefronts for Theme Developers

Shopify customer login and signup Api in react native

IffiChaudhry14
New Member
6 0 0

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

Replies 2 (2)
Bunty
Shopify Partner
133 39 82
IffiChaudhry14
New Member
6 0 0
                const query = `
                mutation customerAccessTokenCreate($input: CustomerAccessTokenCreateInput!) {
                    customerAccessTokenCreate(input: $input) {
                      customerAccessToken {
                        accessToken
                        expiresAt
                      }
                      customerUserErrors {
                        code
                        field
                        message
                      }
                    }
                  }  
        `
                const input = {
                    "email": "irfanarain4732@gmail.com",
                    "password": "47326aA!"
                }
                    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.