Using Pi Urls
In the Pi Network ecosystem, configuring URLs in the Pi Developer Portal establishes a mapping that tells the Pi App Platform SDK where to find your app's code and how to route traffic
These URLs outline your application's pipeline:
- Localhost: The server running directly on your local machine used for initial coding and debugging.
- Hosted URL: The accessible web address (e.g., Vercel, AWS) where your verified, production-ready app code is actually deployed.
- Sandbox URL: A temporary, Pi-provided URL used for testing, linking your local host securely to the Pi Testnet.
- App URL: The final, Pioneer-facing HTTPS address users access within the native Pi Browser.
Localhost
A local address like http://localhost:3000 (React/Node) or http://localhost:5000 (Python) representing the machine you are building the app on.
Pi Purpose: This is the local destination the Pi Network uses to pull your uncompiled code during the early, offline development phase.
Hosted URL
The actual live URL where your web application is deployed on the internet (e.g., https://yourdomain.com or https://vercel.app).
Pi Purpose: This serves as the foundation for your final App URL.
Sandbox URL
A provided URL environment (https://sandbox.minepi.com) that safely mirrors the live Pi browser environment.
Pi Purpose: It is used during development to link your local machine with the Pi SDK, allowing testing of transactions using "Test Pi". By setting your Development URL in the portal, Pi Network maps your localhost environment onto this Sandbox URL, allowing you to debug and authorize via the Pi App utilities menu.
App URL
The domain Pioneers visit to access your application inside the Pi Browser.
Pi Purpose: This URL represents your finished app. It must be an https:// domain and adhere to Pi Trademark Guidelines.
URL Mapping & Traffic Flow
URL mapping in the Pi Developer Portal connects your app's code to the blockchain:
- The Development URL (Localhost & Sandbox): In the portal, you configure your local development port (e.g., http://localhost:3000). The Pi mapping utility uses this to project your coding environment onto sandbox.minepi.com, allowing SDK functions (like authentication) to simulate live features safely.
- The Application URL (Hosted & App): Once ready for testing and production, your Hosted URL is mapped to an official App URL and registered. Pi servers route requests made in the Pi Browser straight to this Hosted domain, connecting to either the Testnet or Mainnet block