"This app is not approved to use the address1 field" when using a test app

Hi there,

I just started getting these errors when using orderCreate - GraphQL Admin on a development store

[{"message" => "This app is not approved to use the address1 field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 12, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "address1"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the address1 field."}}, {"message" => "This app is not approved to use the address2 field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 13, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "address2"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the address2 field."}}, {"message" => "This app is not approved to use the firstName field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 16, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "firstName"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the firstName field."}}, {"message" => "This app is not approved to use the lastName field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 17, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "lastName"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the lastName field."}}, {"message" => "This app is not approved to use the phone field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 18, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "phone"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the phone field."}}, {"message" => "This app is not approved to use the zip field. See https://shopify.dev/docs/apps/launch/protected-customer-data for more details.", "locations" => [{"line" => 20, "column" => 9}], "path" => ["orderCreate", "order", "shippingAddress", "zip"], "extensions" => {"code" => "ACCESS_DENIED", "documentation" => "https://shopify.dev/docs/apps/launch/protected-customer-data", "requiredAccess" => "Shopify approval is required before using the zip field."}}]

How do I use a test app to test creating orders on a development store?

by “test app” I mean an app that’s been created intentionally for testing Shopify APIs only. The test app will never be submitted for review. I have tried submitting the “Protected customer data access” page but that does not work because the test app will never be submitted for review.

Hey @sengming ,

Just selecting the data you need should be sufficient for development apps.

If you’ve done that and are still getting an error, try choosing a distribution method.

thanks for the link that’s super helpful. I’m still confused though. These 2 quotes are from the page you linked to

To access customer data in development, select the data and fields you’re using in the Partner Dashboard.

Where do I find this in the partner dashboard? Is this the Protected customer data access page? e.g. https://partners.shopify.com/876861/apps/78460452865/customer_data

You don’t need to submit a request for review for apps that are installed only on development stores.

For distribution, I need to use a “public app” because I need to use it to test managed pricing. But this line seems to imply that “public apps” that used on development stores do not need to request of review for access to customer data?

“public app” is in quotes because although the distribution type is “public app” I have no intention of making this app public.

Is there a way to create orders with restricted customer data on public apps that will only be used in development stores? Thanks!!!

For the record, this started working again. I.e. I can create orders with restricted customer fields. I don’t know what you did @KyleG-Shopify but thank you!

here’s the order input

{customer:
  {toUpsert:
    {firstName: "Jane",
     email: "test@example.com",
     note: "Test Customer",
     tags: ["test"],
     addresses:
      [{address1: "123 Fake Street",
        city: "Fakecity",
        phone: "1234567890",
        zip: "K2P 1L4",
        country: "CA",
        province: "Ontario",
        firstName: "Jane",
        lastName: "*"}]}},
 discountCode:
  {itemFixedDiscountCode: {code: "TEST DISCOUNT", amountSet: {shopMoney: {amount: 6.9, currencyCode: "USD"}}}},
 financialStatus: "PENDING",
 lineItems:
  [{priceSet: {shopMoney: {amount: 9.6, currencyCode: "USD"}},
    requiresShipping: true,
    title: "TEST LINE ITEM",
    quantity: 1},
   {variantId: "gid://shopify/ProductVariant/30092406194240", quantity: 1, requiresShipping: true}],
 note: "TEST NOTE",
 tags: ["TEST", "TAG"],
 shippingAddress:
  {address1: "123 Fake Street",
   city: "Fakecity",
   phone: "1234567890",
   zip: "K2P 1L4",
   country: "CA",
   province: "Ontario",
   firstName: "Jane",
   lastName: "*"},
 shippingLines: [{title: "Test Shipping Line", priceSet: {shopMoney: {amount: 69, currencyCode: "USD"}}}],
 sourceName: "tokopedia"}

Glad to hear it’s working now. I didn’t do anything specifically to change this; but I guess I’ll take the credit :joy:

Typically for development stores you just need to go through the list and check the fields you need to access. The human review will only happen once you submit the app to the app store. For “public” development apps, just selecting the fields is sufficient for it to work on a dev store.

1 Like