Configuring SDKs

If this is your first time installing Archetype into your codebase, we recommend following the Quickstart guide.

Once you've installed the Archetype SDK for your app, it's time to initialize and configure it.

You should only configure Archetype once, usually early in your application lifecycle. After configuration, the same instance is shared throughout your app.

Make sure you configure Archetype with your App_ID and Secret keys only. You can read more about the different API keys available in our Authentication guide.

Next you need to start registering your customers as they create accounts. This step assumes that you've already set up your own flow for signing users up to your platform. The next code snippet is to be embedded in your functions where you register your customers.

config = { 
    "app_id": "YOUR_APP_ID", 
    "secret_key": "YOUR_SECRET_KEY" 
} 
archetype = Archetype(
    app_id=config["app_id"], 
    secret_key=config["secret_key"]
)
app = Flask(__name__,  static_folder="web/build",  static_url_path="/")
app.wsgi_app = ArchetypeWSGI(app.wsgi_app, config=config)

YOUR_APP_ID and YOUR_SECRET_KEY can be found in your API settings page like so:

SettingsSettings

Once you plug the keys in and deploy, your first requests will be processed in the Archetype platform for overall usage analytics.

If you want to start identifying users and leverage Archetype to handle the entire payments, quota, and API key life cycle for your users, we recommend going to the Users page or the Quickstart guide.


Did this page help you?