To start connecting your app’s users to Anon, you’ll need an SDK Client. This allows Anon to associate connected user sessions with your application.

Anon may have provided you a set of credentials via 1password, which include an example JWKS and a webapp SdkClient. You can skip the below steps and test with them directly.

To support your own JWKS, please use this guide to create your own UserPool and SdkClient.

In this guide, you’ll create a and to link your users’ accounts to Anon via your existing web and mobile apps. Let’s get started!

First, you’ll need an and account to authenticate with Anon’s APIs.

Connecting your Users

To allow your users to connect to Anon’s API from within your application (e.g. a web app, a mobile app, or browser extension), you’ll need to create a which tells Anon how to authenticate your users with Anon’s APIs.

You’ll need to have a valid to make the request to create a , so follow the same steps to get a new if your current one has expired.

Use environment variables to save the configuration data created along the way.

Getting your JSON Web Key Set (JWKS) Public URL

In this guide, you’ll create a that uses a JSON Web Key Set to authenticate your users with Anon’s APIs using their existing id_token from your OAuth Authorization Server.

Anon can support any OAuth provider (such as Auth0 or Stytch) that uses JSON Web Key Sets for verifying signatures of an OIDC JWT id_token.

Follow this guide to obtain your JWKS public url.

You could also host your own JWKS: see this FAQ

Save your JWKS public url to an environment variable ANON_JWKS_PUBLIC_URL for easy reference.

Creating a UserPool

Now that you have the JWKS public url for verifying an id_token from your OAuth provider, you’re ready to create a .

Create a file called userPool.json following this schema (replace the placeholders with your env variables):

{
  "name": "WebAppUsers",
  "description": "Users of coolkid.ai's web app.",
  "authorization": {
    "jwksUri": "${ANON_JWKS_PUBLIC_URL}"
  },
  "organizationId": "${ANON_ORG_ID}"
}

Send off the request to create a :

cat userPool.json | curl --request POST \
  --url https://svc.sandbox.anon.com/org/userPool \
  --header "Authorization: Bearer $ANON_SESSION_TOKEN" \
  --header 'Content-Type: application/json' \
  --data @-

You should see a response like:

{
  "id": "fb874282-e83b-4939-83a2-e8530d31475e",
  "name": "WebAppUsers",
  "description": "Users of coolkid.ai's web app.",
  "authorization": {
    "jwksUri": "<jwks_url>",
    "idClaim": "sub"
  },
  "organizationId": "<your-org-id>"
}

Save that response["id"] to an environment variable ANON_USER_POOL_ID.

Create an SdkClient for your UserPool

Create a file called link_sdkclient.json following this schema (replace the placeholders with your env variables):

{
  "organizationId": "${ANON_ORG_ID}",
  "name": "CoolService",
  "kind": {
    "application": {
      "userPoolId": "${ANON_USER_POOL_ID}"
    }
  },
  "description": "CoolService connected to UserPool"
}

Send off the request to create the :

cat link_sdkclient.json | curl --request POST \
  --url https://svc.sandbox.anon.com/org/sdkClient \
  --header "Authorization: Bearer $ANON_SESSION_TOKEN" \
  --header 'Content-Type: application/json' \
  --data @-

You’ll receive a response like:

{
  "id": "<sdk-client-id>",
  "name": "CoolService",
  "description": "CoolService connected to UserPool",
  "organizationId": "${ANON_ORG_ID}",
  "auth": {
    "type": "userPool",
    "userPoolId": "${ANON_USER_POOL_ID}"
  }
}

Save that response["id"] to an environment variable ANON_SDKCLIENT_ID.

Next Steps

Anon provided you an and a account.

Now with this guide, you created your own and to get your users integrated with Anon!

That’s it! You’re now ready to start connecting user sessions using Anon. Head over to the integration guides for web or iOS to embed the account connection flow into your app.

Select your platform below to continue: