CustomerPaymentMethodSendUpdateEmail access denied

CustomerPaymentMethodSendUpdateEmail access denied

masumluf
Excursionist
38 0 9

Hello I am trying to send update payment method link to trigger CustomerPaymentMethodSendUpdateEmail gql . but I am getting following error. 

 

[{"message":"CustomerPaymentMethodSendUpdateEmail access denied","locations":[{"line":2,"column":11}],"path":["customerPaymentMethodSendUpdateEmail"]}]

 

here is my code, 

 

  const shopData = await shopsController.getById(shopId);
      const client = new Shopify.Clients.Graphql(
        shopData.shopId,
        shopData.offlineAccessToken
      );

      const mailResponse = await client.query({
        data: `mutation customerPaymentMethodSendUpdateEmail(gid://shopify/CustomerPaymentMethod/${paymentId}: ID!) {
          customerPaymentMethodSendUpdateEmail(customerPaymentMethodId: $customerPaymentMethodId) {
            customer {
              # Customer fields
              id
              email
            }
            userErrors {
              field
              message
            }
          }
        }
        `,
      });

 

and my app setting is,

 

shopify.png

 

 

Replies 0 (0)