Skip to content
Last updated

Authentication and Authorization

The Firstup API authentication model is based on OAuth 2.0, ensuring secure access to API endpoints. Every request must include an access token, which identifies the authenticated user (if applicable) and the program being accessed. Requests made with an access token function similarly to actions performed in Program Studio or the Firstup mobile apps as a logged-in user.

To request access to the API, contact support.

User authentication and OAuth token requests are handled by a dedicated authentication server at:

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

Authentication Methods

Firstup supports three authentication methods to meet different integration needs:

Choosing the Right Method

Look at our main Authentication methods article for a full breakdown.

Use CaseRecommended Method
Mobile or browser-based appAuthorization Code Grant with PKCE
App that needs to act on user’s behalfAuthorization Code Grant
Backend system or automated processClient Credentials Grant
Identity delegation or SSO integrationsJWT Bearer Token Grant

If you're unsure which method fits your use case, please contact your Firstup representative for assistance.

Program Scoping

When registering an OAuth app, you'll need to define which program(s) it can access. The API scopes assigned to the app determine the permissions available for that program.

Scopes must match the API operations you intend to use.

Using an OAuth 2.0 Library

To simplify authentication, use an OAuth 2.0 library such as:

  • Node.js: simple-oauth2
  • Python: requests-oauthlib
  • Java: Spring Security OAuth

Example using Python

import requests

token_url = "https://auth.socialchorus.com/oauth/token"
data = {
    "grant_type": "authorization_code",
    "code": "AUTH_CODE_HERE",
    "redirect_uri": "YOUR_REDIRECT_URI",
    "client_id": "YOUR_CLIENT_ID",
    "code_verifier": "YOUR_GENERATED_VERIFIER"
}

response = requests.post(token_url, data=data)
print(response.json())

Auth Scope List and Definitions

Different scopes grant different permissions for API access.

The following is a list of all possible auth scopes that can be requested for an access token. The required scopes for each endpoint are listed in the API Endpoint Reference. If scopes are not specified in the auth request, the default scopes for your OAuth application will be granted.

Click here to request API scopes.

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.
filter.initiative_tags.idLeave blank to return the default of all content. Alternatively, pass an array or comma separated list of initiative tags to limit the content. An initiative is a tag used for reporting purposes to help track business objectives through topics and campaigns by reporting on performance and engagement.
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.

Security Considerations

You will be assigned a “Client ID” and a “Client Secret” by Firstup. Protect all credentials and tokens carefully and be especially careful with Client Secret. Notify Firstup immediately if you believe there is any chance these values have been compromised and we will be happy to replace them.

Access tokens expire after 2 hours. Authorization codes expire in 10 minutes. Refresh tokens are valid as long as the client app is registered with the authorization server and the user continues to give it consent.

Protecting Client Secrets

  • Never expose your client secret in public repositories.
  • Store credentials securely (e.g., environment variables, secret management tools).

Handling JWT Tokens Securely

  • Keep your private key secure—do not expose it in your codebase.
  • Set a short expiration time (exp claim) for JWT tokens.
  • Use HTTPS to transmit JWT tokens securely.

Token Expiration & Refresh

  • Access tokens expire after 2 hours and must be refreshed when needed.
  • Authorization codes expire after 10 minutes.
  • The refresh token mechanism allows apps to obtain new access tokens automatically.