Crewmojo Help
  • Welcome!
  • Getting Started
    • Logging In
      • Troubleshooting Logging In
    • Dashboard
      • Company Logo and Background
    • User Management
      • Adding Users
      • Setting Manager
      • Deactivate User
      • File Notes and Attachments
  • Features
    • Objectives
      • Administration/Configuration
      • User Experience
      • Reporting
      • Frequently Asked Questions
      • Permissions Explanation
    • 1-on-1's
      • Administration/Configuration
      • User Experience
      • Reporting
    • Reviews
      • Administration/Configuration
      • User Experience
      • Reporting
      • Frequently Asked Questions
    • Teams
    • Snapshots
      • Administration/Configuration
      • User Experience
      • Reporting
    • Journeys
      • Frequently Asked Questions
    • Library and Surveys
    • Feedback
      • Mojoscore
    • Reporting
    • Values
    • Documents
    • Announcements
    • Proxy
    • Audiences
    • Themes
  • Integrations
    • Crewmojo API
    • Microsoft 365
      • Teams App
      • Troubleshooting Microsoft 365
    • Google Workspace
    • Okta
      • Okta - Manual Configuration
    • Zoom
    • Slack
      • Slack - Manual Configuration
    • Cisco DUO SSO
    • Single Sign-On
    • Calendar
  • Uploading Users & Teams
    • API
    • App
      • Pre Configured
      • Self Configured
  • Downloading Data & Reports
    • API
    • App
  • Support
    • Browsers
    • Contact
    • Apache Log4j2 Issue
Powered by GitBook
On this page
  • To get the Client ID and Secret Key
  • Request an Access Token

Was this helpful?

  1. Integrations

Crewmojo API

The Crewmojo API is a RESTful based API that allows uploading of employee data as well as accessing reports. The OAuth2 authorisation framework is used to grant access to the Crewmojo API.

PreviousThemesNextMicrosoft 365

Last updated 9 months ago

Was this helpful?

Please speak to us if you are interested in enabling this feature.

Once we have configured your API access, your Crewmojo Admin users will have access to the Client ID and Secret Key within Crewmojo.

To get the Client ID and Secret Key

  • Log on to Crewmojo web app

  • Go to Company Settings (under hamburger menu in top left hand corner)

  • Click on the 'Integrations' Icon:

  • Locate the API Authentication card:

  • Copy the Client ID, then view the Secret Key by clicking the 'eye' icon and copy that. Note that each access to the Secret Key is logged.

To access a Crewmojo API endpoint you will firstly use the Client ID and Secret Key to get a short-lived Access Token. The Access Token is valid for 30 minutes after which time you will need to retrieve another Access Token.

Each time you request a new Access Token, all previous Access Tokens are invalidated.

A valid access methodology is to request a new Access Token before each API call to Crewmojo.

Request an Access Token

Endpoints:

Environment
URL

Test

https://api.test.crewmojo.com/v1/oauth/token

Production

https://api.crewmojo.com/v1/oauth/token

Request Type:

POST

Content Type:

application/x-www-form-urlencoded

or

application/json

Crewmojo API will accept either.

Request Body:

Value
Type

grant_type

string, must be client_credentials

client_id

string, retrieved from Crewmojo Admin (above)

client_secret

string, retrieved from Crewmojo Admin (above)


curl -X POST 'https://api.crewmojo.com/v1/oauth/token' \
-H 'Content-Type: application/json' \
-d '{"grant_type":"client_credentials","client_id":"ccccc","client_secret":"ssss"}'

Response:

Code
Description / Example

200

Success

Content-Type: application/json

400

Invalid Data error

Content-Type: application/json

401

Unauthorized error

Content-Type: application/json

500

Internal Server Error

Content-Type: application/json

{
  "access_token": "aaaaaaaaaaaaaaa",
  "token_type": "Bearer",
  "expires_in": 1800
}
{
  "success": "false",
  "httpErrorCode": 400,
  "errorMessage": "Invalid data received"
}
{
  "success": "false",
  "httpErrorCode": 401,
  "errorMessage": "Unauthorized"
}
{
  "success": "false",
  "httpErrorCode": 500,
  "errorMessage": "Error generating access token"
}