LogoLogo
Build appsContact API support
Build apps
  • Build apps
  • Site Templates
  • API Reference
  • Changelog
Build apps
  • Build with Ecwid apps
  • Ecwid API features
  • Get started
    • Set up your dev environment in Ecwid
    • Make your first API request
    • Add more features to your custom app
    • API glossary
  • Develop apps
    • What is an Ecwid app
    • Private and public Ecwid apps
    • App settings
    • Community libraries
  • Launch apps
    • Public apps overview
    • Monetize public apps
    • Steps to go live with a public app
    • Native and external apps
      • Access store data from the app
      • Build user settings page for Ecwid admin
        • Use Native app JS SDK
        • Deep linking
        • Manage personal user settings storage
  • Contact Ecwid API support team

Lightspeed® 2025

On this page

Was this helpful?

  1. Launch apps
  2. Native and external apps
  3. Build user settings page for Ecwid admin

Deep linking

Last updated 5 days ago

Was this helpful?

Apps in Ecwid admin can receive specific store information before loading through deep linking. When an app is opened from a specific page, Ecwid sends a URI-encoded page slug as an app_state query parameter. Use its value to adjust app flow depending on the page users came from.

Default iframeUrl example: https://my.ecwid.com/store/1234567#app:name=my-cool-app&parent-menu=sales

Example of the iframeUrl with deep linking: https://my.ecwid.com/store/1234567/#app:name=my-cool-app&app_state=orderId%3A%2012

With the app_state, you can redirect users to the page they came from with the method.

Receive app state when accessing store data

Apps loading in Ecwid admin can receive the app_state before the . When users open the app, you'll receive a request on your server:

GET https://www.example.com/my-app-iframe-page?payload=353035362c226163636573735f746f6b656e223a22776d6&app_state=orderId%3A%2012&cache-killer=13532

Check app_state in your authentication flow and save its value to a variable.

Code example:

<?php

// URL Encoded App state passed to the app
  if (isset($_GET['app_state'])){
    $app_state = $_GET['app_state'];
  }
?>

Decoded payload example:

{
  "store_id": 1003,
  "lang": "en",
  "access_token":"xxxxxxxxxxxxxxxx",
  "app_state":"orderId%3A%2012"
}
EcwidApp.OpenPage()
authentication process