Getting Started with Sites
Overview
The Sites feature provides an API for querying hierarchical data in the Niantic Spatial platform. This guide will help you get started using Sites in your application.
The Sites feature organizes data in a hierarchical structure:
User → Organization → Site → Asset.
Requirements
The Sites feature requires authentication using Niantic Spatial Auth. Your application must be authenticated before using any Sites API methods.
To authenticate:
- Ensure you have access the Niantic Spatial Portal where you can manage your organizations, sites, and assets.
- Set up auth in your application by following the Auth guide
Basic Usage
The Sites API follows a simple pattern: Make requests and handle results. All requests are asynchronous and return struct data that represents the Sites entity you are requesting.
1. Acquire a Sites Session
Add the Sites component to your unity scene's gameobject

Then add a reference to the Sites component to your monobehaviour:
[SerializeField]
private SitesClientManager _sitesClientManager;
2. Query User Information
Start by querying information about the currently authenticated user:
var userResult = await _sitesClientManager.GetSelfUserInfoAsync();
if (userResult.Status == SitesRequestStatus.Success && userResult.User.HasValue) {
var user = userResult.User.Value;
Debug.Log($"User: {user.FirstName} {user.LastName}");
}
3. Query Organizations
Discover organizations that the user has access to:
var orgsResult = await _sitesClientManager.GetOrganizationsForUserAsync(userId);
if (orgsResult.Status == SitesRequestStatus.Success) {
foreach (var org in orgsResult.Organizations) {
Debug.Log($"Organization: {org.Name}");
}
}
4. Query Sites
Browse sites within an organization:
var sitesResult = await _sitesClientManager.GetSitesForOrganizationAsync(orgId);
if (sitesResult.Status == SitesRequestStatus.Success) {
foreach (var site in sitesResult.Sites) {
Debug.Log($"Site: {site.Name}");
}
}
5. Query Assets
Discover spatial assets available at a site:
var assetsResult = await _sitesClientManager.GetAssetsForSiteAsync(siteId);
if (assetsResult.Status == SitesRequestStatus.Success) {
foreach (var asset in assetsResult.Assets) {
Debug.Log($"Asset: {asset.Name} ({asset.AssetType})");
}
}
Next Steps
- Explore the full API reference