Authentication

This page will help you get authenticated with the v2 SkillsEngine API.

🚧

The SkillsEngine API requires token-based authentication before requests can be made of any API endpoints.

When you sign up to use SkillsEngine, you are provided with a client_id and client_secret. These two keys allow you to authenticate against our /api/token endpoint and receive an access_token. This token will be required for all subsequent requests against any SkillsEngine endpoints (unless otherwise specified).

If you are building a server-side application, it should handle this authentication flow via HTTPS using a JSON credentials payload.

Here's an example of authenticating with SkillsEngine using the Ruby programming language:

require 'rest-client'
require 'json'

client_id = '4ea1b...'
client_secret = 'a2982...'

response = RestClient.post 'https://api.skillsengine.com/api/token', {
  grant_type: 'client_credentials',
  client_id: client_id,
  client_secret: client_secret
}

After that you'll have the access token in the response:

access_token = JSON.parse(response)["access_token"]
# => 'c4739...'

And then, you can request access to protected resources. Unlike the previous version of the API, you no longer need to provide an Accept header. Instead, the version is passed in the URL path. The Authorization header with a Bearer token is still required, and should use the access_token from above:

# e.g.
RestClient.post 'https://api.skillsengine.com/v2/competencies/analyze',
  { 
    'Authorization' => "Bearer #{access_token}",
    'Content-Type' => "application/json"
  }

🚧

Ensure you are providing a Content-Type header with the value application/json. While many REST code libraries append this header automatically, if you are operating at a lower-level, or using a library that doesn't, you will need to specify this header yourself, otherwise you may get an empty result response.