List Landing Pages
Only available for enterprise customers. Returns all landing pages for the authenticated account.
Request
# Sign the payload
PAYLOAD="{}"
SIG=$(printf '%s' "$(echo -n "$PAYLOAD" | base64)" | openssl dgst -sha256 -hmac "$SHARED_SECRET" -hex | awk '{print $NF}')
# Send curl request
curl -X GET \
-H "X-ACCT-ID: $ACCOUNT_ID" \
-H "X-PAYLOAD-SIG: $SIG" \
--data-urlencode "sig_payload=$PAYLOAD" \
https://api.accessgrid.com/v1/console/landing-pages
require 'accessgrid'
acct_id = ENV['ACCOUNT_ID']
secret_key = ENV['SECRET_KEY']
client = AccessGrid.new(acct_id, secret_key)
landing_pages = client.console.list_landing_pages
landing_pages.each do |page|
puts "ID: #{page.id}, Name: #{page.name}, Kind: #{page.kind}"
puts " Password Protected: #{page.password_protected}"
puts " Logo URL: #{page.logo_url}" if page.logo_url
end
import AccessGrid from 'accessgrid';
const accountId = process.env.ACCOUNT_ID;
const secretKey = process.env.SECRET_KEY;
const client = new AccessGrid(accountId, secretKey);
const listLandingPages = async () => {
try {
const landingPages = await client.console.listLandingPages();
landingPages.forEach(page => {
console.log(`ID: ${page.id}, Name: ${page.name}, Kind: ${page.kind}`);
console.log(` Password Protected: ${page.passwordProtected}`);
if (page.logoUrl) console.log(` Logo URL: ${page.logoUrl}`);
});
} catch (error) {
console.error('Error listing landing pages:', error);
}
};
listLandingPages();
from accessgrid import AccessGrid
import os
account_id = os.getenv('ACCOUNT_ID')
secret_key = os.getenv('SECRET_KEY')
client = AccessGrid(account_id, secret_key)
landing_pages = client.console.list_landing_pages()
for page in landing_pages:
print(f"ID: {page['id']}, Name: {page['name']}, Kind: {page['kind']}")
print(f" Password Protected: {page['password_protected']}")
if page.get('logo_url'):
print(f" Logo URL: {page['logo_url']}")
package main
import (
"context"
"fmt"
"os"
"github.com/Access-Grid/accessgrid-go"
)
func main() {
accountID := os.Getenv("ACCOUNT_ID")
secretKey := os.Getenv("SECRET_KEY")
client, err := accessgrid.NewClient(accountID, secretKey)
if err != nil {
fmt.Printf("Error creating client: %v\n", err)
return
}
ctx := context.Background()
landingPages, err := client.Console.ListLandingPages(ctx)
if err != nil {
fmt.Printf("Error listing landing pages: %v\n", err)
return
}
for _, page := range landingPages {
fmt.Printf("ID: %s, Name: %s, Kind: %s\n", page.ID, page.Name, page.Kind)
fmt.Printf(" Password Protected: %v\n", page.PasswordProtected)
if page.LogoURL != "" {
fmt.Printf(" Logo URL: %s\n", page.LogoURL)
}
}
}
using AccessGrid;
public async Task ListLandingPagesAsync()
{
var accountId = Environment.GetEnvironmentVariable("ACCOUNT_ID");
var secretKey = Environment.GetEnvironmentVariable("SECRET_KEY");
var client = new AccessGridClient(accountId, secretKey);
var landingPages = await client.Console.ListLandingPagesAsync();
foreach (var page in landingPages)
{
Console.WriteLine($"ID: {page.Id}, Name: {page.Name}, Kind: {page.Kind}");
Console.WriteLine($" Password Protected: {page.PasswordProtected}");
if (page.LogoUrl != null)
Console.WriteLine($" Logo URL: {page.LogoUrl}");
}
}
import com.organization.accessgrid.AccessGridClient;
import com.organization.accessgrid.model.LandingPage;
import java.util.List;
public class LandingPageService {
private final AccessGridClient client;
public LandingPageService() {
String accountId = System.getenv("ACCOUNT_ID");
String secretKey = System.getenv("SECRET_KEY");
this.client = new AccessGridClient(accountId, secretKey);
}
public void listLandingPages() throws AccessGridException {
List<LandingPage> landingPages = client.console().listLandingPages();
for (LandingPage page : landingPages) {
System.out.printf("ID: %s, Name: %s, Kind: %s%n",
page.getId(), page.getName(), page.getKind());
System.out.printf(" Password Protected: %s%n", page.isPasswordProtected());
if (page.getLogoUrl() != null)
System.out.printf(" Logo URL: %s%n", page.getLogoUrl());
}
}
}
<?php
require 'vendor/autoload.php';
use AccessGrid\Client;
$accountId = $_ENV['ACCOUNT_ID'];
$secretKey = $_ENV['SECRET_KEY'];
$client = new Client($accountId, $secretKey);
$landingPages = $client->console->listLandingPages();
foreach ($landingPages as $page) {
echo "ID: {$page['id']}, Name: {$page['name']}, Kind: {$page['kind']}\n";
echo " Password Protected: {$page['password_protected']}\n";
if ($page['logo_url']) {
echo " Logo URL: {$page['logo_url']}\n";
}
}
Response
[
{
"id": "a1b2c3d4e5f",
"name": "Miami Office Access Pass",
"created_at": "2025-01-15T12:00:00Z",
"kind": "universal",
"password_protected": false,
"logo_url": null
},
{
"id": "f6e5d4c3b2a",
"name": "NYC Office Badge",
"created_at": "2025-02-20T08:30:00Z",
"kind": "personalized",
"password_protected": true,
"logo_url": "https://accessgrid.com/path/to/logo.png"
}
]
Create Landing Page
Only available for enterprise customers. Creates a new landing page for the authenticated account.
name
string
Required. The name of the landing page
kind
string
Required. Must be "universal" or "personalized"
additional_text
nullable string
Optional text displayed on the landing page
bg_color
nullable string
Optional hex color for the background (e.g., "#f1f5f9")
logo
nullable string
Base64 encoded PNG or JPEG image (max 10MB)
allow_immediate_download
nullable boolean
Only for universal landing pages. Enables pass installation without phone number authentication
password
nullable string
Only for personalized landing pages. Password to protect the landing page
is_2fa_enabled
nullable boolean
Only for personalized landing pages. Enable two-factor authentication
Request
# Base64 encode the logo
LOGO=$(base64 < /path/to/logo.png | tr -d '\n')
# Build the JSON payload
JSON=$(cat <<EOF
{
"name": "Miami Office Access Pass",
"kind": "universal",
"additional_text": "Welcome to the Miami Office",
"bg_color": "#f1f5f9",
"allow_immediate_download": true,
"logo": "$LOGO"
}
EOF)
# Sign the payload
SIG=$(printf '%s' "$(echo -n "$JSON" | base64)" | openssl dgst -sha256 -hmac "$SHARED_SECRET" -hex | awk '{print $NF}')
# Send curl request
curl -X POST \
-H "X-ACCT-ID: $ACCOUNT_ID" \
-H "X-PAYLOAD-SIG: $SIG" \
-H "Content-Type: application/json" \
-d "$JSON" \
https://api.accessgrid.com/v1/console/landing-pages
require 'accessgrid'
acct_id = ENV['ACCOUNT_ID']
secret_key = ENV['SECRET_KEY']
client = AccessGrid.new(acct_id, secret_key)
landing_page = client.console.create_landing_page(
name: "Miami Office Access Pass",
kind: "universal",
additional_text: "Welcome to the Miami Office",
bg_color: "#f1f5f9",
allow_immediate_download: true
)
puts "Landing page created: #{landing_page.id}"
puts "Name: #{landing_page.name}, Kind: #{landing_page.kind}"
import AccessGrid from 'accessgrid';
const accountId = process.env.ACCOUNT_ID;
const secretKey = process.env.SECRET_KEY;
const client = new AccessGrid(accountId, secretKey);
const createLandingPage = async () => {
try {
const landingPage = await client.console.createLandingPage({
name: "Miami Office Access Pass",
kind: "universal",
additionalText: "Welcome to the Miami Office",
bgColor: "#f1f5f9",
allowImmediateDownload: true
});
console.log(`Landing page created: ${landingPage.id}`);
console.log(`Name: ${landingPage.name}, Kind: ${landingPage.kind}`);
} catch (error) {
console.error('Error creating landing page:', error);
}
};
createLandingPage();
from accessgrid import AccessGrid
import os
account_id = os.getenv('ACCOUNT_ID')
secret_key = os.getenv('SECRET_KEY')
client = AccessGrid(account_id, secret_key)
landing_page = client.console.create_landing_page(
name="Miami Office Access Pass",
kind="universal",
additional_text="Welcome to the Miami Office",
bg_color="#f1f5f9",
allow_immediate_download=True
)
print(f"Landing page created: {landing_page['id']}")
print(f"Name: {landing_page['name']}, Kind: {landing_page['kind']}")
package main
import (
"context"
"fmt"
"os"
"github.com/Access-Grid/accessgrid-go"
)
func main() {
accountID := os.Getenv("ACCOUNT_ID")
secretKey := os.Getenv("SECRET_KEY")
client, err := accessgrid.NewClient(accountID, secretKey)
if err != nil {
fmt.Printf("Error creating client: %v\n", err)
return
}
params := accessgrid.CreateLandingPageParams{
Name: "Miami Office Access Pass",
Kind: "universal",
AdditionalText: "Welcome to the Miami Office",
BgColor: "#f1f5f9",
AllowImmediateDownload: true,
}
ctx := context.Background()
landingPage, err := client.Console.CreateLandingPage(ctx, params)
if err != nil {
fmt.Printf("Error creating landing page: %v\n", err)
return
}
fmt.Printf("Landing page created: %s\n", landingPage.ID)
fmt.Printf("Name: %s, Kind: %s\n", landingPage.Name, landingPage.Kind)
}
using AccessGrid;
public async Task CreateLandingPageAsync()
{
var accountId = Environment.GetEnvironmentVariable("ACCOUNT_ID");
var secretKey = Environment.GetEnvironmentVariable("SECRET_KEY");
var client = new AccessGridClient(accountId, secretKey);
var landingPage = await client.Console.CreateLandingPageAsync(new CreateLandingPageRequest
{
Name = "Miami Office Access Pass",
Kind = "universal",
AdditionalText = "Welcome to the Miami Office",
BgColor = "#f1f5f9",
AllowImmediateDownload = true
});
Console.WriteLine($"Landing page created: {landingPage.Id}");
Console.WriteLine($"Name: {landingPage.Name}, Kind: {landingPage.Kind}");
}
import com.organization.accessgrid.AccessGridClient;
import com.organization.accessgrid.model.CreateLandingPageRequest;
import com.organization.accessgrid.model.LandingPage;
public class LandingPageService {
private final AccessGridClient client;
public LandingPageService() {
String accountId = System.getenv("ACCOUNT_ID");
String secretKey = System.getenv("SECRET_KEY");
this.client = new AccessGridClient(accountId, secretKey);
}
public LandingPage createLandingPage() throws AccessGridException {
CreateLandingPageRequest request = CreateLandingPageRequest.builder()
.name("Miami Office Access Pass")
.kind("universal")
.additionalText("Welcome to the Miami Office")
.bgColor("#f1f5f9")
.allowImmediateDownload(true)
.build();
LandingPage landingPage = client.console().createLandingPage(request);
System.out.printf("Landing page created: %s%n", landingPage.getId());
return landingPage;
}
}
<?php
require 'vendor/autoload.php';
use AccessGrid\Client;
$accountId = $_ENV['ACCOUNT_ID'];
$secretKey = $_ENV['SECRET_KEY'];
$client = new Client($accountId, $secretKey);
$landingPage = $client->console->createLandingPage([
'name' => 'Miami Office Access Pass',
'kind' => 'universal',
'additional_text' => 'Welcome to the Miami Office',
'bg_color' => '#f1f5f9',
'allow_immediate_download' => true
]);
echo "Landing page created: {$landingPage['id']}\n";
echo "Name: {$landingPage['name']}, Kind: {$landingPage['kind']}\n";
Response
{
"id": "a1b2c3d4e5f",
"name": "Miami Office Access Pass",
"created_at": "2025-01-15T12:00:00Z",
"kind": "universal",
"password_protected": false,
"logo_url": "https://accessgrid.com/path/to/logo.png"
}
Update Landing Page
Only available for enterprise customers. Updates an existing landing page. The kind field is immutable after creation.
name
nullable string
The name of the landing page
additional_text
nullable string
Text displayed on the landing page
bg_color
nullable string
Hex color for the background (e.g., "#f1f5f9")
logo
nullable string
Base64 encoded PNG or JPEG image (max 10MB)
allow_immediate_download
nullable boolean
Only for universal landing pages. Enables pass installation without phone number authentication
password
nullable string
Only for personalized landing pages. Password to protect the landing page
is_2fa_enabled
nullable boolean
Only for personalized landing pages. Enable two-factor authentication
Request
# Base64 encode the logo
LOGO=$(base64 < /path/to/logo.png | tr -d '\n')
# Build the JSON payload
JSON=$(cat <<EOF
{
"name": "Updated Miami Office Access Pass",
"additional_text": "Welcome! Tap below to get your access pass.",
"bg_color": "#e2e8f0",
"logo": "$LOGO"
}
EOF)
# Sign the payload
SIG=$(printf '%s' "$(echo -n "$JSON" | base64)" | openssl dgst -sha256 -hmac "$SHARED_SECRET" -hex | awk '{print $NF}')
# Send curl request
curl -X PUT \
-H "X-ACCT-ID: $ACCOUNT_ID" \
-H "X-PAYLOAD-SIG: $SIG" \
-H "Content-Type: application/json" \
-d "$JSON" \
https://api.accessgrid.com/v1/console/landing-pages/{landing_page_id}
require 'accessgrid'
acct_id = ENV['ACCOUNT_ID']
secret_key = ENV['SECRET_KEY']
client = AccessGrid.new(acct_id, secret_key)
landing_page = client.console.update_landing_page(
landing_page_id: "0xlandingpage1d",
name: "Updated Miami Office Access Pass",
additional_text: "Welcome! Tap below to get your access pass.",
bg_color: "#e2e8f0"
)
puts "Landing page updated: #{landing_page.id}"
puts "Name: #{landing_page.name}"
import AccessGrid from 'accessgrid';
const accountId = process.env.ACCOUNT_ID;
const secretKey = process.env.SECRET_KEY;
const client = new AccessGrid(accountId, secretKey);
const updateLandingPage = async () => {
try {
const landingPage = await client.console.updateLandingPage({
landingPageId: "0xlandingpage1d",
name: "Updated Miami Office Access Pass",
additionalText: "Welcome! Tap below to get your access pass.",
bgColor: "#e2e8f0"
});
console.log(`Landing page updated: ${landingPage.id}`);
console.log(`Name: ${landingPage.name}`);
} catch (error) {
console.error('Error updating landing page:', error);
}
};
updateLandingPage();
from accessgrid import AccessGrid
import os
account_id = os.getenv('ACCOUNT_ID')
secret_key = os.getenv('SECRET_KEY')
client = AccessGrid(account_id, secret_key)
landing_page = client.console.update_landing_page(
landing_page_id="0xlandingpage1d",
name="Updated Miami Office Access Pass",
additional_text="Welcome! Tap below to get your access pass.",
bg_color="#e2e8f0"
)
print(f"Landing page updated: {landing_page['id']}")
print(f"Name: {landing_page['name']}")
package main
import (
"context"
"fmt"
"os"
"github.com/Access-Grid/accessgrid-go"
)
func main() {
accountID := os.Getenv("ACCOUNT_ID")
secretKey := os.Getenv("SECRET_KEY")
client, err := accessgrid.NewClient(accountID, secretKey)
if err != nil {
fmt.Printf("Error creating client: %v\n", err)
return
}
params := accessgrid.UpdateLandingPageParams{
LandingPageID: "0xlandingpage1d",
Name: "Updated Miami Office Access Pass",
AdditionalText: "Welcome! Tap below to get your access pass.",
BgColor: "#e2e8f0",
}
ctx := context.Background()
landingPage, err := client.Console.UpdateLandingPage(ctx, params)
if err != nil {
fmt.Printf("Error updating landing page: %v\n", err)
return
}
fmt.Printf("Landing page updated: %s\n", landingPage.ID)
fmt.Printf("Name: %s\n", landingPage.Name)
}
using AccessGrid;
public async Task UpdateLandingPageAsync()
{
var accountId = Environment.GetEnvironmentVariable("ACCOUNT_ID");
var secretKey = Environment.GetEnvironmentVariable("SECRET_KEY");
var client = new AccessGridClient(accountId, secretKey);
var landingPage = await client.Console.UpdateLandingPageAsync("0xlandingpage1d", new UpdateLandingPageRequest
{
Name = "Updated Miami Office Access Pass",
AdditionalText = "Welcome! Tap below to get your access pass.",
BgColor = "#e2e8f0"
});
Console.WriteLine($"Landing page updated: {landingPage.Id}");
Console.WriteLine($"Name: {landingPage.Name}");
}
import com.organization.accessgrid.AccessGridClient;
import com.organization.accessgrid.model.UpdateLandingPageRequest;
import com.organization.accessgrid.model.LandingPage;
public class LandingPageService {
private final AccessGridClient client;
public LandingPageService() {
String accountId = System.getenv("ACCOUNT_ID");
String secretKey = System.getenv("SECRET_KEY");
this.client = new AccessGridClient(accountId, secretKey);
}
public LandingPage updateLandingPage() throws AccessGridException {
UpdateLandingPageRequest request = UpdateLandingPageRequest.builder()
.landingPageId("0xlandingpage1d")
.name("Updated Miami Office Access Pass")
.additionalText("Welcome! Tap below to get your access pass.")
.bgColor("#e2e8f0")
.build();
LandingPage landingPage = client.console().updateLandingPage(request);
System.out.printf("Landing page updated: %s%n", landingPage.getId());
return landingPage;
}
}
<?php
require 'vendor/autoload.php';
use AccessGrid\Client;
$accountId = $_ENV['ACCOUNT_ID'];
$secretKey = $_ENV['SECRET_KEY'];
$client = new Client($accountId, $secretKey);
$landingPage = $client->console->updateLandingPage('0xlandingpage1d', [
'name' => 'Updated Miami Office Access Pass',
'additional_text' => 'Welcome! Tap below to get your access pass.',
'bg_color' => '#e2e8f0'
]);
echo "Landing page updated: {$landingPage['id']}\n";
echo "Name: {$landingPage['name']}\n";
Response
{
"id": "a1b2c3d4e5f",
"name": "Miami Office Access Pass",
"created_at": "2025-01-15T12:00:00Z",
"kind": "universal",
"password_protected": false,
"logo_url": "https://accessgrid.com/path/to/logo.png"
}