Skip to content

Latest commit

 

History

History
96 lines (79 loc) · 2.09 KB

File metadata and controls

96 lines (79 loc) · 2.09 KB
description layout
Learn how Airstack automatically configures hubs for you and how you can add custom hubs configuration, as needed.
title description tableOfContents outline pagination
visible
true
visible
true
visible
true
visible
visible
true

🛜 Farcaster Hubs

In Airstack Frog Recipes, Airstack Hubs is the default option available if you don't set anything to the hub field. All you need to provide in your new Frog instance will be the Airstack API key:

{% tabs %} {% tab title="TypeScript" %}

import { Frog } from "@airstack/frog";

export const app = new Frog({
  apiKey: process.env.AIRSTACK_API_KEY as string,
});

{% endtab %}

{% tab title="JavaScript" %}

const { Frog } = require("@airstack/frog");

export const app = new Frog({
  apiKey: process.env.AIRSTACK_API_KEY,
});

{% endtab %} {% endtabs %}

You can also add custom Hub URL and additional headers for API keys:

{% tabs %} {% tab title="TypeScript" %}

import { Frog } from "@airstack/frog";
 
const app = new Frog({
  hub: {
    apiUrl: "CUSTOM_HUBS_URL",
    fetchOptions: {
      headers: {
        // API keys
      }
    }
  }
});

{% endtab %}

{% tab title="JavaScript" %}

const { Frog } = require("@airstack/frog");
 
const app = new Frog({
  hub: {
    apiUrl: "CUSTOM_HUBS_URL",
    fetchOptions: {
      headers: {
        // API keys
      }
    }
  }
});

{% endtab %} {% endtabs %}

Otherwise, Frog also has some pre-configured hubs that you can choose for your hub configuration:

{% embed url="https://frog.fm/concepts/securing-frames#supplying-hub-configuration" %} Add Hubs Configuration to Frog {% endembed %}

Developer Support

If you have any questions or need help regarding Farcaster Hubs configuration for your Airstack Frog Recipe, please join our Airstack's Telegram group.

More Resources