Server Pixel Mutations Now Enforce App Access: What Developers Need to Know

Starting November 20 2026 Shopify’s eventBridgeServerPixelUpdate and pubSubServerPixelUpdate mutations require a user with app access. Learn what changed, who’s impacted, and how to adjust your code to avoid access‑denied errors.

Server Pixel Mutations Now Enforce App Access: What Developers Need to Know
7 sections

Shopify just rolled out a security‑focused change that affects any app that updates server pixel endpoints. From November 20 2026 onward, the GraphQL mutations eventBridgeServerPixelUpdate and pubSubServerPixelUpdate reject online access tokens when the calling staff member does not have explicit access to the app. This post breaks down the update, explains who is affected, and gives you actionable steps to keep your integrations running smoothly.

What Changed

Both mutations now enforce the same user‑access check that already exists for serverPixelCreate and serverPixelDelete. In practical terms, the API will only accept:

• An offline access token (the classic long‑lived token used by background jobs).

• An online access token belonging to a staff member who has been granted access to the app in the Shopify admin.

If the request is made with an online token for a user who lacks app access, Shopify returns the same “access denied” error you’d see for a missing scope, leaving the pixel endpoint unchanged. The required scopes—write_pixels, read_customer_events, and write_server_pixels—remain unchanged.

Who Is Affected

Any private, custom, or public app that calls eventBridgeServerPixelUpdate or pubSubServerPixelUpdate with an online token for a staff member who does not have the app installed will now hit an error. The impact is limited to:

• Apps that rely on real‑time staff‑initiated updates (e.g., UI buttons that switch a pixel’s destination).

• Background jobs that mistakenly use an online token instead of an offline token.

Apps already using offline tokens or online tokens for users with proper app access continue to work unchanged.

Why It Matters

Server pixel endpoints control where sensitive customer event data is sent. By ensuring only authorized staff can modify those endpoints, Shopify closes a potential privilege‑escalation path. The change applies to *all* GraphQL Admin API versions without a deprecation window, making it a hard security fix rather than a soft rollout.

How to Update Your App

1 . Audit your code paths. Search for calls to eventBridgeServerPixelUpdate or pubSubServerPixelUpdate and note which token type you use.

2 . Switch to an offline token for any background or scheduled job. Offline tokens are generated during the OAuth flow with the “offline_access” scope and can be stored securely for long‑term use.

3 . If you must use an online token (e.g., a UI action performed by a staff member), verify that the staff member has the app installed. In the Shopify admin, go to Apps → Your App → App access and ensure the user appears in the list.

4 . Implement graceful error handling. When the mutation returns an access‑denied error, surface a clear message to the user (e.g., “You need app access to change this pixel. Contact the store owner.”) and log the incident for debugging.

Code Example

// Example using an offline token (Node.js, graphql-request)

const { GraphQLClient, gql } = require('graphql-request');

// Retrieve the stored offline token for your app

const OFFLINE_TOKEN = process.env.SHOPIFY_OFFLINE_TOKEN;

const client = new GraphQLClient(https://${shop}.myshopify.com/admin/api/2026-04/graphql.json, {

headers: {

'X-Shopify-Access-Token': OFFLINE_TOKEN,

'Content-Type': 'application/json',

},

});

const UPDATE_PIXEL = gql`

mutation UpdatePixel($id: ID!, $endpoint: URL!) {

eventBridgeServerPixelUpdate(id: $id, endpoint: $endpoint) {

userErrors { field message }

serverPixel { id endpoint }

}

}

`;

(async () => {

try {

const variables = { id: 'gid://shopify/ServerPixel/123456', endpoint: 'https://my-tracking.example.com' };

const response = await client.request(UPDATE_PIXEL, variables);

console.log('Pixel updated:', response.eventBridgeServerPixelUpdate.serverPixel);

} catch (error) {

if (error.response && error.response.errors) {

console.error('Shopify error:', error.response.errors[0].message);

} else {

console.error('Unexpected error:', error);

}

}

})();

If you need to use an online token, wrap the call in a try/catch and check for the specific access‑denied message. Then prompt the staff member to request app access from the store owner.

Testing & Error Handling

  • Create a test staff account without app access and attempt the mutation with its online token. You should receive an error like “Access denied”.
  • Verify that the same mutation succeeds with an offline token.
  • Add unit tests that mock the GraphQL response and assert that your fallback UI displays a helpful message.
  • Log the user ID and shop domain whenever an access‑denied error occurs; this helps store owners identify which employee needs app permission.
  • Conclusion

    The new user‑access requirement for eventBridgeServerPixelUpdate and pubSubServerPixelUpdate tightens security around server pixel configuration. By auditing your token strategy, ensuring staff members have proper app access, and adding robust error handling, you can avoid downtime and keep your pixel data flowing safely. Need a hand updating your OAuth flow or troubleshooting token errors? Reach out to our Shopify developer support team or drop a comment below—we’re happy to help!

    Tags
    Sources

    Related Articles

    Flow Gains Real-Time “Updated” Triggers for Orders, Customers, and More

    Flow Gains Real-Time “Updated” Triggers for Orders, Customers, and More

    Shopify Flow now offers eight new “updated” triggers—covering customers, orders, refunds, fulfillments, returns, collections, locations, and inventory items. Learn what changed, who it impacts, and how to implement the new triggers to automate real‑time responses in your store.

    November 20, 20265 min
    Email and Text Receipts Now Mirror Your POS Printed Receipt

    Email and Text Receipts Now Mirror Your POS Printed Receipt

    Shopify POS receipts sent by email or SMS now use the same template as printed receipts, eliminating duplicate templates and simplifying compliance. Learn what changed, who it impacts, and how to update your settings and code.

    November 20, 20264 min
    Embedding YouTube & Vimeo Directly via File Reference Metafields in Shopify API 2027-01

    Embedding YouTube & Vimeo Directly via File Reference Metafields in Shopify API 2027-01

    Shopify’s 2027-01 API now lets file reference metafields store YouTube and Vimeo video URLs, unlocking seamless video embeds for merchants and developers. Learn what changed, who it affects, and how to implement the new feature today.

    November 20, 20265 min
    Why Your Shopify App Must Enable IP Allowlist by Tomorrow (Nov 20 2026)

    Why Your Shopify App Must Enable IP Allowlist by Tomorrow (Nov 20 2026)

    Shopify’s latest security deadline forces public and custom apps to add an IP allowlist. Learn what changed, who’s impacted, and step‑by‑step how to stay compliant before the November 20 cut‑off.

    November 19, 20265 min