New Shopify Certification now available: Liquid Storefronts for Theme Developers

Access denied for checkoutServerExtensionCreate field. Required access: The shop must have access to

Solved
sushilsth21
Shopify Partner
6 0 5

Hi There,

 

I am trying to build the custom app. The idea is to validate the customer VAT number. I have build the field that registers customer VAT number when creating account. I can see it store VAT in customer notes.

 

Now I want to validate this VAT is present or not before making checkout. Is this something possible using Checkout UI extension?

 

Also I am following the tutorial https://shopify.dev/docs/apps/checkout/cart-checkout-validations on step https://shopify.dev/docs/apps/checkout/cart-checkout-validations when running graphical I get "Access denied for checkoutServerExtensionCreate field. Required access: The shop must have access to". 

 

What does this error mean and how can I provide access for checkoutServerExtensionCreate field?

 

Thank you

Accepted Solution (1)
HagenH
Shopify Partner
3 1 2

This is an accepted solution.

Hi @sushilsth21,

 

I found out how to make it work. You actually have to create a new dev store with that special kind of preview enabled. A normal dev store won't do. See here.

In the UI you can then enable the respective extension preview:

HagenH_0-1677513196543.png

 

Best,

Hagen

 

View solution in original post

Replies 4 (4)
HagenH
Shopify Partner
3 1 2

Getting the exact same error for the tutorial:

 

{
  "data": {
    "checkoutServerExtensionCreate": null
  },
  "errors": [
    {
      "message": "Access denied for checkoutServerExtensionCreate field. Required access: The shop must have access to checkout server extensions.",
      "locations": [
        {
          "line": 2,
          "column": 3
        }
      ],
      "path": [
        "checkoutServerExtensionCreate"
      ],
      "extensions": {
        "code": "ACCESS_DENIED",
        "documentation": "https://shopify.dev/api/usage/access-scopes",
        "requiredAccess": "The shop must have access to checkout server extensions."
      }
    }
  ],
  "extensions": {
    "cost": {
      "requestedQueryCost": 10,
      "actualQueryCost": 10,
      "throttleStatus": {
        "maximumAvailable": 1000,
        "currentlyAvailable": 990,
        "restoreRate": 50
      }
    }
  }
}

 

The API entry for the mutation is also not very helpful. It just states 

The shop must have access to checkout server extensions.

whatever that means.

 

Can anybody help? Its always frustrating when examples do not seem to work.

 

Thanks!

oscprofessional
Shopify Partner
15736 2353 3051

Hello
@sushilsth21, @HagenH 
Here are the Steps you can follow
If you are using custom app i.e product-listing as show in screenshot below , So you can give permission to that particular app to fetch/upload data.


Steps to give Permission to your app :


Apps->Apps and sales channels->develop apps
select your app name then go configuration
where you can find list of permission for your particular app
1.Admin API access scopes
2.Storefront API integration

oscprofessional_0-1677239965510.png

oscprofessional_1-1677240197614.png

 

Here Admin API integration click on edit button
Admin API access scopes

oscprofessional_2-1677240592654.png

 

Thanks!!

Get pass your Store Core Web Vital Free Speed Optimization Audit, Chat on WhatsApp | Skype : oscprofessionals-87 | Email: pallavi@oscprofessionals.com | Custom Pricing Wholesale App : Free | Hire us | Guaranteed Site Speed Optimization | Website Free Audit | Shopify Theme Customization | Build Shopify Private App | Shopify SEO | Digital Marketing
HagenH
Shopify Partner
3 1 2

Hi Oscprofessional,

 

thank you so much for your reply. Unfortunately this does not solve the error. The configuration just allows to change the normal acces scope for an app, created by the shop owner. But even then those are normal access scopes. The error message does not hint to the lack of a normal access scope. It says 

The shop must have access to checkout server extensions.

and none of the APIs be it Admin or Storefront has this particular access.

 

Thank you so much,

Hagen

HagenH
Shopify Partner
3 1 2

This is an accepted solution.

Hi @sushilsth21,

 

I found out how to make it work. You actually have to create a new dev store with that special kind of preview enabled. A normal dev store won't do. See here.

In the UI you can then enable the respective extension preview:

HagenH_0-1677513196543.png

 

Best,

Hagen