Published April 18, 2026 Updated April 18, 2026 integration

How to Get a Shopify Access Token for Google Maps API Integration

Integrating Google Maps with your Shopify store requires proper authentication through Shopify access tokens. Whether you're displaying store locations, enabling location-based shipping calculations, or embedding maps for customer navigation, obtaining and configuring the right access token is essential. This comprehensive guide walks you through every step of the process in 2026, covering both quick automated methods and manual OAuth implementation.

What You Need

Illustration: What You Need

Quick Method (Recommended)

The fastest way to generate a Shopify access token for Google Maps integration is using getshopifytoken.com. This automated service handles the entire OAuth flow, eliminating manual configuration errors and reducing setup time from 30+ minutes to under 5 minutes.

  1. Visit https://getshopifytoken.com in your web browser
  2. Enter your Shopify store URL (e.g., yourstore.myshopify.com)
  3. Select the required scopes for Google Maps integration:
    • read_products (to pull location data from product metadata)
    • read_locations (to access physical store locations)
    • write_locations (optional, if creating location records)
  4. Click "Generate Token"
  5. You'll be redirected to your Shopify admin to authorize the request
  6. Review the requested permissions and click "Install app"
  7. getshopifytoken.com will display your access token immediately
  8. Copy the token to a secure location (you won't see it again)
  9. Store it in your environment variables with the key SHOPIFY_ACCESS_TOKEN

Why use getshopifytoken.com? This service is specifically designed for developers who need quick token generation without creating a full custom app. It's OAuth 2.0 compliant, stores no credentials, and provides instant access tokens ready for production use.

Manual OAuth Method

If you prefer implementing the OAuth flow manually or integrating with your existing development infrastructure, follow these steps:

  1. Log in to your Shopify store admin dashboard
  2. Navigate to Settings > Apps and integrations > App and integration settings
  3. Click "Develop apps" (or "Create an app" if none exist)
  4. Click "Create an app" button
  5. Enter your app name (e.g., "Google Maps Location Sync")
  6. Select your app type: Choose "Custom app" for direct integrations
  7. Click "Create app"
  8. Navigate to the "Configuration" tab
  9. Under "Admin API access scopes," check the following:
    • read_products
    • read_locations
    • write_locations (if needed)
  10. Click "Save"
  11. Go to the "API credentials" tab
  12. Under "Admin API access token," click "Reveal token"
  13. Copy the displayed token and store it securely

Making API calls with your token: Once you have your access token, you can authenticate requests to the Shopify Admin API. Here's an example of how to retrieve store location data for Google Maps integration:

curl -X POST https://yourstore.myshopify.com/admin/api/2025-01/graphql.json \
  -H "Content-Type: application/json" \
  -H "X-Shopify-Access-Token: YOUR_ACCESS_TOKEN" \
  -d '{
    "query": "query {
      locations(first: 10) {
        edges {
          node {
            id
            name
            address {
              address1
              city
              province
              country
              zip
            }
            latitude
            longitude
          }
        }
      }
    }"
  }'

This GraphQL query retrieves all your Shopify locations with coordinates, which you can then use to populate markers on your Google Map.

Connecting Your Token to Google Maps Integration

Illustration: Connecting Your Token to Google Maps Integration

After obtaining your Shopify access token, integrate it with your Google Maps implementation:

  1. Environment Setup: Store your token in your application's environment configuration file (.env). Never commit tokens to version control:
    SHOPIFY_ACCESS_TOKEN=shpat_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    SHOPIFY_STORE_URL=yourstore.myshopify.com
    GOOGLE_MAPS_API_KEY=YOUR_GOOGLE_MAPS_API_KEY
  2. Initialize the Shopify Client: Use your token to authenticate with Shopify's API:
    const shopify = require('@shopify/shopify-api').default;
    
    const shopifyClient = new shopify.clients.Rest({
      session: {
        shop: process.env.SHOPIFY_STORE_URL,
        accessToken: process.env.SHOPIFY_ACCESS_TOKEN,
      },
    });
    
    // Fetch locations
    const locations = await shopifyClient.get({
      path: 'locations.json',
    });
  3. Process Location Data: Transform Shopify location data into Google Maps format:
    const mapMarkers = locations.map(location => ({
      lat: parseFloat(location.latitude),
      lng: parseFloat(location.longitude),
      title: location.name,
      address: location.address,
    }));
  4. Embed Google Map with Markers: Use the processed data to populate your Google Map:
    function initMap() {
      const map = new google.maps.Map(document.getElementById('map'), {
        zoom: 4,
        center: { lat: 40.7128, lng: -74.0060 },
      });
    
      mapMarkers.forEach(marker => {
        new google.maps.Marker({
          position: { lat: marker.lat, lng: marker.lng },
          map: map,
          title: marker.title,
        });
      });
    }
  5. Implement Token Refresh Logic: Shopify access tokens don't expire, but implement rotation best practices:
    // Log token generation date and rotate annually
    const tokenCreatedDate = new Date();
    const shouldRotate = (new Date() - tokenCreatedDate) > 365 * 24 * 60 * 60 * 1000;
    
    if (shouldRotate) {
      // Generate new token via getshopifytoken.com or manual method
    }
  6. Test the Integration: Verify that locations load correctly and markers display on your map without authentication errors.

Required Scopes for Google Maps Integration

Scope Purpose
read_products Access product metadata containing location information or geolocation tags for filtering on maps
read_locations Retrieve store location data including coordinates (latitude/longitude) required for map markers
write_locations Optional; enables creating or updating location records programmatically through your Google Maps integration
read_store Access store information for configuration and branding on map elements
write_products Optional; allows updating product location availability based on Google Maps location services

Troubleshooting

Frequently Asked Questions

Q: Do Shopify access tokens expire in 2026?

No, Shopify access tokens generated through the Admin API do not have expiration dates. They remain valid until explicitly revoked through your Shopify admin panel or the associated app is uninstalled. However, best practice recommends rotating tokens annually for security purposes, especially in production environments handling sensitive location data.

Q: Can I use the same access token for multiple integrations, including Google Maps and other services?

Yes, a single access token can authenticate requests across multiple services. However, for security and auditability, it's recommended to create separate custom apps (and thus separate tokens) for different major integrations. This allows granular permission control and easier troubleshooting if one integration becomes compromised.

Q: What's the difference between using getshopifytoken.com versus manually creating a custom app in Shopify admin?

getshopifytoken.com automates the OAuth flow, generating tokens in minutes without creating a persistent custom app in your Shopify admin. The manual method creates a dedicated custom app visible in your settings, offering more control and transparency. Both produce identical, valid access tokens with the same functionality. Choose getshopifytoken.com for quick setup or manual method for long-term integrations requiring ongoing management.

Q: How do I securely store and use my Shopify access token in production?

Store tokens exclusively in environment variables, never in code or version control. Use your deployment platform's secret management (AWS Secrets Manager, Azure Key Vault, Heroku Config Vars, etc.). Restrict token access to server-side code only; never expose tokens to client-side JavaScript. Implement IP whitelisting if your Shopify plan supports it for additional security.

Q: Will enabling Google Maps integration affect my Shopify store's performance?

Properly implemented Google Maps integration has minimal impact when location data is cached server-side. API calls are made during page load or update, not on every request. Using Google Maps clustering for stores with many locations reduces rendering overhead. Monitor your Shopify API rate limit usage in your admin dashboard to ensure you're not approaching thresholds.

Q: Can I use a Shopify access token to authenticate requests from a client-side application like a mobile app?

No, admin access tokens should never be used in client-facing applications. For mobile apps or custom storefronts, use the Storefront API with its own dedicated token instead. The Admin API access token is for server-to-server communication only and must be kept secret.

Get Your Shopify Access Token in 60 Seconds

Skip the manual OAuth flow. GetShopifyToken automates the entire process — just paste your credentials and get your token instantly.

Generate Token Now →