Create OAuth Token

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
❗️

OAuth Token URL

To acquire a token use the following URL:

https://app.7shifts.com/oauth2/token

Due to a limitation in our sandbox you will not be able to use the Try It! button on this page to acquire a token. You can use curl as per the example below.

Scopes

For the list of valid scopes reference the valid scopes in the Authentication page under in API Usage.

Sample Request

curl --request POST --url 'https://app.7shifts.com/oauth2/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=client_credentials' \
--data-urlencode 'client_id={CLIENT_ID}' \
--data-urlencode 'client_secret={CLIENT_SECRET}' \
--data-urlencode 'scope=v1_access companies:read companies:write locations:read locations:write users:read users:write departments:read departments:write roles:read roles:write sales:read sales:write shifts:read shifts:write time_punches:read time_punches:write events:read events:write'

Sample Response

{
    "token_type":"Bearer",
    "expires_in":3600,
    "access_token":"eyJ0eXAiOiJKV1QiLCJhbZciOiJSUzI1NiJ9.eyJhdWQiOiJhOWQyMWFjNGYwNmJiOTYzMzQzY2I4NmQ3NmZkMGE5ZRTMxN2NmOTg4IiwianRpIjoiNjEwZDYyNzQwYzAxNDYzYzFjNzc1NWQxOTc0ZGNlMjk0ZGIxNzI1ZGQzYTMzMThkMmQzNjBkNTk1N2JiYWZkYmI0YjljOTA3ZDUwMjBjNTEiLCJpYXQiOjE2NTcyOTYxNzgsIm5iZiI6MTY1NzI5NjE3OCwiZXhwIjoxNjU3Mjk5Nzc4LCJzdWIiOiIiLCJzY29wZXMiOlsidjFfYWNjZXNzIiwiY29tcGFuaWVzOnJlYWQiLCJjb21wYW5pZXM6d3JpdGUiLCJsb2NhdGlvbnM6cmVhZCIsImxvY2F0aW9uczp3cml0ZSIsInVzZXJzOnJlYWQiLCJ1c2Vyczp3cml0ZSIsImRlcGFydG1lbnRzOnJlYWQiLCJkZXBhcnRtZW50czp3cml0ZSIsInJvbGVzOnJlYWQiLCJyb2xlczp3cml0ZSIsInNhbGVzOnJlYWQiLCJzYWxlczp3cml0ZSIsInNoaWZ0czpyZWFkIiwic2hpZnRzOndyaXRlIiwidGltZV9wdW5jaGVzOnJlYWQiLCJ0aW1lX3B1bmNoZXM6d3JpdGUiLCJldmVudHM6cmVhZCIsImV2ZW50czp3cml0ZSJdfQ.mKInbUWiytfKxL65cYMuoMKR5ATvjOGttiViZ4bMwP0Xff6EEfPu3QzriGusB6wQmK6t3YYzJjFQei_GD80w1GnzcXd1rYU9NOcIys8o-EjLWGd7m2NG7uMWHBYNyI8gvSzABei7GlAKK2ha1RvFOp9gf9nnITisydGI-7kA2Guv0mnKo3mLyTz-RHBavMRLiTIDL2BZPZtWaoIMXQqTVspspJOIfZ0H2XN037aMMqdLHHnKiP-tJJAP9U9S9jX3jI73iNz4Cv6U802ossytwSUzAOs9vZuqE4cH0DfTAQmvqIgG56WUFszhQMWPWC0IMgIc5HIMnXSgab68sf-RBA"
}
Form Data
string
enum
required

Token grant type. For Partner OAuth tokens specifying client_credentials

Allowed:
string
required
string
string

A space-delimited list of scopes.

string

The authorization code returned by the auth server response to oauth2/authorize. Used by authorization code flow

string

The code_verifier parameter as described in the PKCE specification. Used by authorization code flow

string

The URI to redirect to upon a successful request. Used by authorization code flow. This URI must have been configured previously

Responses

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json