<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: baskwind yang</title>
    <description>The latest articles on DEV Community by baskwind yang (@baskwind).</description>
    <link>https://dev.to/baskwind</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4277927%2Ff8d72a9b-4d91-498a-aa2e-314902d47f8b.png</url>
      <title>DEV Community: baskwind yang</title>
      <link>https://dev.to/baskwind</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/baskwind"/>
    <language>en</language>
    <item>
      <title>Your Admin API tokens expire Jan 1 — here's the safe way</title>
      <dc:creator>baskwind yang</dc:creator>
      <pubDate>Wed, 02 Dec 2026 08:23:25 +0000</pubDate>
      <link>https://dev.to/baskwind/your-admin-api-tokens-expire-jan-1-heres-the-safe-way-2kok</link>
      <guid>https://dev.to/baskwind/your-admin-api-tokens-expire-jan-1-heres-the-safe-way-2kok</guid>
      <description>&lt;h1&gt;
  
  
  Your Admin API tokens expire Jan 1 — here's the safe way
&lt;/h1&gt;

&lt;p&gt;If your store's integrations still run on non-expiring offline tokens, the clock is running out. Public apps still using them face delisting on January 1, 2027, merchants see a warning in Shopify admin from January 15, and their Admin API calls start returning 403 on April 1, 2027. Existing installs keep working until April 1 — but January 1 is the deadline, not a grace period.&lt;/p&gt;

&lt;p&gt;This timeline applies to public apps. Custom apps and apps created by merchants aren't affected — unless they were created on or after December 1, 2026, in which case they must use expiring tokens from the start.&lt;/p&gt;

&lt;p&gt;You don't need to panic. You need a checklist.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Audit what you have
&lt;/h2&gt;

&lt;p&gt;List every place a Shopify token lives: scripts, AI assistants, automation tools, dashboards, and that one cron job someone set up two years ago. If the same token is pasted in three places, count it three times — rotating one copy leaves the others live.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Rotate, don't just renew
&lt;/h2&gt;

&lt;p&gt;A rotated token is a new secret. The old one stops working everywhere at once. That's the point: if the old token leaked into a chat log or a screenshot, rotation kills it. Renewal that keeps the same value doesn't.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Revoke what you can't account for
&lt;/h2&gt;

&lt;p&gt;Any token you can't trace to a tool and an owner should be revoked, not kept "just in case." An unused token is pure risk — it grants access and provides nothing in return.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Move to credentials that renew themselves
&lt;/h2&gt;

&lt;p&gt;The durable fix is to stop managing Shopify's tokens by hand. Use a setup where the Shopify access token is stored encrypted server-side and renewed automatically, while the key your tools hold is a separate, revocable one. When Shopify rotates its tokens underneath, your tools keep working and you don't get a 401 at 2 a.m.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Verify with a read-only query
&lt;/h2&gt;

&lt;p&gt;After every rotation or reconnection, run a read-only query — fetch five products — before you let anything write. A green check on a read means the credential works; a write is not the way to test one.&lt;/p&gt;




&lt;p&gt;That's what TokenPort does: one shop-bound API key per store, revocable in one click, with the Shopify credentials encrypted and auto-renewed on the server. Your tools use the TokenPort key; they never see the raw Shopify token.&lt;/p&gt;

&lt;p&gt;Free tier to try it. Pro is $1/month with a 30-day trial.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apps.shopify.com/tokenport" rel="noopener noreferrer"&gt;https://apps.shopify.com/tokenport&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>api</category>
      <category>security</category>
      <category>ai</category>
    </item>
    <item>
      <title>How to let Claude Code manage your Shopify store safely</title>
      <dc:creator>baskwind yang</dc:creator>
      <pubDate>Wed, 02 Dec 2026 08:20:11 +0000</pubDate>
      <link>https://dev.to/baskwind/how-to-let-claude-code-manage-your-shopify-store-safely-34en</link>
      <guid>https://dev.to/baskwind/how-to-let-claude-code-manage-your-shopify-store-safely-34en</guid>
      <description>&lt;h1&gt;
  
  
  How to let Claude Code manage your Shopify store safely
&lt;/h1&gt;

&lt;p&gt;You want your AI assistant to check orders, update prices, or sync inventory. The usual way is to paste your Shopify Admin API token into a chat window — and that's the problem. That token has write access to your whole store, and once it's in a chat log, you can't take it back.&lt;/p&gt;

&lt;p&gt;Here's the safer way, in three steps.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you need
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A Shopify store with TokenPort installed (&lt;a href="https://apps.shopify.com/tokenport" rel="noopener noreferrer"&gt;listing&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Claude Code (or any AI assistant that can run shell commands)&lt;/li&gt;
&lt;li&gt;Python 3&lt;/li&gt;
&lt;li&gt;The TokenPort Skill: download &lt;code&gt;tokenport-skill.zip&lt;/code&gt; from &lt;a href="https://tokenport.breeze.computer/tokenport-skill.zip" rel="noopener noreferrer"&gt;https://tokenport.breeze.computer/tokenport-skill.zip&lt;/a&gt; and extract it into your assistant's skill directory&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Setup — connect your store
&lt;/h2&gt;

&lt;p&gt;In your terminal, run the skill's setup command, replacing &lt;code&gt;&amp;lt;skill-dir&amp;gt;&lt;/code&gt; with the absolute path where you extracted the skill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;skill-dir&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/scripts/shopify_api.py setup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It asks for two things:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Your store's original &lt;code&gt;xxx.myshopify.com&lt;/code&gt; domain&lt;/li&gt;
&lt;li&gt;Your TokenPort API Key — the shop-bound key (it starts with &lt;code&gt;tp_&lt;/code&gt;) you copy from TokenPort inside Shopify Admin. If your store doesn't have one yet, select &lt;strong&gt;Create API key&lt;/strong&gt; in the app.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You can also add a Storefront API token here (public or private) if you want your assistant to build buyer-facing features. For this tutorial, the Admin key is enough.&lt;/p&gt;

&lt;p&gt;Setup saves a config file at &lt;code&gt;~/.config/tokenport/&amp;lt;shop-domain&amp;gt;.json&lt;/code&gt; with strict permissions (&lt;code&gt;700&lt;/code&gt; on the directory, &lt;code&gt;600&lt;/code&gt; on the file). Each store gets its own file, and your credentials are never printed to chat. Keep the config path handy — you'll pass it to every command.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Check — verify before you trust it
&lt;/h2&gt;

&lt;p&gt;Saving a config file doesn't prove anything. Run the check:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;skill-dir&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/scripts/shopify_api.py check --config ~/.config/tokenport/&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;shop-domain&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check runs a minimal read-only query against each configured API and reports success only for the APIs that passed &lt;strong&gt;and returned your store&lt;/strong&gt;. If it fails, don't guess — the error tells you what to fix:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;402 subscription_required&lt;/code&gt; — the store needs an active trial or paid plan. Open TokenPort in Shopify Admin and choose a plan.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;503 billing_unavailable&lt;/code&gt; — Shopify couldn't be reached to verify billing. Wait and retry; it's temporary.&lt;/li&gt;
&lt;li&gt;A 403 can mean a missing scope or an IP allowlist problem. Ask the store owner to check the connection in TokenPort.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 3: Your first Admin query
&lt;/h2&gt;

&lt;p&gt;Write one GraphQL operation in a file, for example &lt;code&gt;products.graphql&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight graphql"&gt;&lt;code&gt;&lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nf"&gt;products&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;first&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;edges&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;node&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;id&lt;/span&gt;
        &lt;span class="n"&gt;title&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then run it through the skill:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python3 &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;skill-dir&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;/scripts/shopify_api.py admin products.graphql --config ~/.config/tokenport/&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;shop-domain&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Your assistant just read your store through TokenPort — and the raw Shopify token never left the server. The TokenPort key it used is revocable in one click: if it ever leaks, revoke it in Shopify Admin and the old key dies everywhere at once.&lt;/p&gt;

&lt;h2&gt;
  
  
  What happens behind the scenes
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;TokenPort's Cloudflare Worker sends your Admin GraphQL request to Shopify and keeps the Shopify credentials encrypted (AES-256-GCM) and auto-renewed on the server. Your tools only ever hold the &lt;code&gt;tp_&lt;/code&gt; key.&lt;/li&gt;
&lt;li&gt;Each store has exactly one active TokenPort API Key. Rotating or revoking it disables the previous key across all connected tools.&lt;/li&gt;
&lt;li&gt;If Shopify rejects the stored token, a read-only check lets TokenPort try renewing it. If the owner needs to reconnect, the existing TokenPort key keeps working after reconnection.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A few rules that will save you later
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;One operation per file, JSON variables for anything dynamic.&lt;/strong&gt; The script handles transport, not authorization — check the scopes each operation needs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Query before you edit.&lt;/strong&gt; Read the product, variant, or inventory record first; use real IDs and SKUs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Verify after every write.&lt;/strong&gt; Check HTTP status, top-level GraphQL &lt;code&gt;errors&lt;/code&gt;, and mutation &lt;code&gt;userErrors&lt;/code&gt;. HTTP 200 alone isn't enough.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never put credentials in chat, code, or logs.&lt;/strong&gt; Not the TokenPort key, not the Storefront token. The setup command hides credential input for a reason.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;TokenPort is free to start, and Pro is $1/month with a 30-day trial.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://apps.shopify.com/tokenport" rel="noopener noreferrer"&gt;https://apps.shopify.com/tokenport&lt;/a&gt;&lt;/p&gt;

</description>
      <category>shopify</category>
      <category>claude</category>
      <category>ai</category>
      <category>graphql</category>
    </item>
  </channel>
</rss>
