Skip to content
Last updated

Authentication and Authorization

The Firstup API uses OAuth 2.0 to authenticate requests. Each request must include an access token associated with the program being accessed. Depending on the authentication method, the token represents either an application or a signed-in user.

Access depends on:

  • The authentication method used.
  • The scopes granted to the access token.
  • For user-based authentication, the authenticated user’s permissions.

Before You Begin

Before requesting API credentials:

  1. Identify the API operations your integration needs.
  2. Choose an authentication method that supports those operations.
  3. Check each endpoint’s required scopes in the API reference.

Contact your Firstup representative to request an OAuth application and the credentials required by your chosen authentication method. Provide your program, integration use case, and required API scopes so Firstup can configure the appropriate access.

Depending on your authentication method, you’ll also need to provide:

  • Authorization Code / PKCE: Your application’s redirect URI.
  • JWT Bearer: Your public key, issuer and audience values, and the user identifier type you intend to use.

Store your credentials securely. For user-based authentication, ensure the user has the necessary permissions to perform the intended operations.

Authentication Servers

Use the authentication server for your program’s region to authenticate users and request access tokens.

  • US1: https://auth.socialchorus.com
  • US2: https://auth.us2.onfirstup.com
  • EU: https://auth.onfirstup.eu

These are authentication servers. Send API requests to the API server specified in the API reference for your region.

Authentication Methods

Firstup supports three OAuth 2.0 grant types:

Choosing the Right Method

Choose based on whether your integration acts as an application or on behalf of a user.

Integration requirementRecommended methodKey considerations
Server-to-server administration, such as managing users, audiences, content, or webhooksClient Credentials GrantNo user login is required. Does not support user-specific Feeds operations.
Browser or mobile application acting on behalf of a signed-in userAuthorization Code Grant with PKCERequires user login. Does not require a client secret.
Server-hosted application acting on behalf of a signed-in userAuthorization Code GrantRequires user login. Store the client secret on the server.
Server-side integration accessing Feeds for a specific user without an interactive loginJWT Bearer Token GrantRequires trust configuration with Firstup. Currently supports Feeds operations.

User-based access remains subject to the authenticated user’s permissions.

For prerequisites, request examples, and token renewal instructions, see Authentication Methods. For browser and mobile integrations, see the Authorization Code with PKCE walkthrough.

If you’re unsure which method fits your integration, contact your Firstup representative.

Programs, Scopes, and User Permissions

Your OAuth application is configured to access specific Firstup programs and API scopes.

  • Program access determines which program’s resources the application can access.
  • Scopes determine which API operations the application can request.
  • User permissions, for user-based authentication, further limit what the authenticated user can access or change.

Selecting a scope does not override an authentication-method restriction or grant additional permissions to a user. For example, assigning feeds.read to a Client Credentials application does not enable it to use user-specific Feeds operations.

Selecting Scopes

Each endpoint in the API reference lists its required scopes.

Request the scopes needed by your integration when arranging your OAuth application with your Firstup representative.

When requesting an access token, the requested scopes must be permitted for your OAuth application. If you omit scopes from the token request, the application’s default scopes are granted.

Auth Scope List and Definitions

Use this table to understand individual permissions. Refer to each endpoint’s requirements when selecting scopes for your integration.

ScopeDescription
admin_loginLogin using an admin login UI. (Uncommon)
content.readView and list details of content in your program.
content.writeCreate, view, and update content in your program.
content.videos.downloadDownload video content from content posts.
content.replication.auditView content replication status associated with manageable content in your program.
feeds.readView your feeds.
feeds.rendered.readView rendered content from feed posts.
feeds.engageView your feeds and engage with posts (likes, bookmarks, etc).
openidView the authenticated user's OpenID profile information.
profileView your basic profile information.
emailView your email addresses.
addressView your physical addresses.
phoneView your phone numbers.
employmentView your employment information.
publicView the authenticated user's profile information.
users.readView and list details of users in your program.
users.writeCreate, view, and update users in your program.
groups.readView and list details of groups in your program.
groups.writeCreate, view, and update groups in your program.
webhooks.readView and list details of webhook subscriptions in your program.
webhooks.writeCreate, view, and update webhook subscriptions in your program.

Using an OAuth 2.0 Library

Use a maintained OAuth 2.0 library appropriate to your language and application type. Choose one that supports your selected grant type and, where applicable, PKCE and refresh tokens.

Configure the library with your region’s authentication server and the settings registered for your OAuth application.

See Authentication Methods for flow-specific examples.

Security Considerations

Protect application credentials, access tokens, and refresh tokens. Use a client secret only where required by your authentication method. Authorization Code with PKCE does not require a client secret.

Protecting Credentials and Tokens

  • Never expose client secrets, private keys, or tokens in public repositories.
  • Keep client secrets and JWT private keys on trusted servers, outside browser and mobile application code.
  • Store secrets securely using an appropriate secret management service.
  • Use HTTPS for authentication and API requests.
  • Contact Firstup immediately if you suspect credentials or tokens have been compromised.

Using PKCE

  • Use S256 as the code challenge method.
  • Generate a new code verifier for each authorization attempt.
  • Validate the returned state value before exchanging the authorization code.

See the Authorization Code with PKCE walkthrough for implementation instructions.

Handling JWT Assertions

  • Keep the signing private key secure.
  • Set a short expiration time using the exp claim.
  • Ensure the issuer and audience match the values registered with Firstup. Set the subject to the user’s identifier using the identifier type agreed during setup.
  • Perform JWT signing and token exchange on the server.

Token Expiration and Renewal

Token or codeExpiration and renewal
Access tokenExpires after two hours. Obtain a replacement using the appropriate flow.
Authorization codeExpires after ten minutes. Exchange it promptly for an access token.
Client Credentials access tokenNo refresh token is issued. Repeat the Client Credentials grant to obtain a new access token.
Authorization Code / PKCE access tokenUse the refresh token returned by the flow to obtain a new access token.
JWT Bearer access tokenGenerate a new signed JWT assertion and repeat the token exchange to obtain a new access token.

Protect refresh tokens as carefully as access tokens. If renewal fails, handle the error and repeat the relevant authentication flow when necessary.