OAuth 2.0

ClearSlide supports OAuth 2.0 Grant Flows as described in RFC 6749 Section 4.1 and RFC 6749 Section 4.3

To get started please email us with your client redirect url as described in RFC 6749 Section 3.1. Upon receiving this, we will provide you with a client id and client secret. Without these three variables defined (client id and client secret), the steps below will not make much sense.

Obtaining Authorization with Authorization Code Grant

Step 1: Obtain Authorization Code

For getting the authorization code, you need to change two variables in the URL https://oauth.platform.clearslide.com/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_CLIENT_REDIRECT_URL&response_type=code and paste it in your browser where
YOUR_CLIENT_ID = your client Id received from ClearSlide
YOUR_CLIENT_REDIRECT_URL = URL shared with ClearSlide while creating the client Id
if you don’t need a special redirect URL - just set the URL to your home page

Step 2: Requesting access token

In the below HTTP request, update three variables that are specific to a partner:

YOUR_AUTHORIZATION_HEADER = Encode the string "yourClientId:yourClientSecret" to the Base64 format
YOUR_AUTHORIZATION_CODE = authorization code received in Step 1 above
YOUR_CLIENT_REDIRECT_URL = url shared with ClearSlide while creating the client Id

curl -X POST 'https://oauth.platform.clearslide.com/oauth/token' \
--header 'Authorization: Basic YOUR_AUTHORIZATION_HEADER' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'code=YOUR_AUTHORIZATION_CODE' \
--data-urlencode 'redirect_uri=YOUR_CLIENT_REDIRECT_URL' \
--data-urlencode 'grant_type=authorization_code'
Http URL - https://oauth.platform.clearslide.com/oauth/token
Http Method - POST
Http Header - Authorization: Basic YOUR_AUTHORIZATION_HEADER
Http Header - Content-Type: application/x-www-form-urlencoded
Http Param - code: YOUR_AUTHORIZATION_CODE
Http Param - redirect_uri: YOUR_CLIENT_REDIRECT_URL
Http Param - grant_type: authorization_code
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"85c51611-be05-491a-a137-c161adb906da",
"token_type":"bearer",
"refresh_token":"5230ab7e-1fc1-4a39-be7d-49e552f10f25",
"Expires_in":"3600",
"scope":"read write"
}

Step 3: Refreshing access token

In the below HTTP request, update three variables that are specific to a partner:

YOUR_AUTHORIZATION_HEADER = Encode the string "yourClientId:yourClientSecret" to the Base64 format
YOUR_REFRESH_TOKEN = your refresh token obtained while requesting the access token

curl -X POST 'https://oauth.platform.clearslide.com/oauth/token' \
--header 'Authorization: Basic YOUR_AUTHORIZATION_HEADER' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'refresh_token=YOUR_REFRESH_TOKEN' \
--data-urlencode 'grant_type=refresh_token'
Http URL - https://oauth.platform.clearslide.com/oauth/token
Http Method - POST
Http Header - Authorization: Basic YOUR_AUTHORIZATION_HEADER
Http Header - Content-Type: application/x-www-form-urlencoded'
Http Param - refresh_token: YOUR_REFRESH_CODE
Http Param - grant_type: refresh_token
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"85c51611-be05-491a-a137-c161adb906da",
"token_type":"bearer",
"refresh_token":"5230ab7e-1fc1-4a39-be7d-49e552f10f25",
"Expires_in":"3600",
"scope":"read write"
}

Obtaining Authorization with Resource Owner Password Credentials Grant

Step 1: Requesting access token

In the below HTTP request, update three variables that are specific to a partner:

YOUR_AUTHORIZATION_HEADER = Encode the string "yourClientId:yourClientSecret" to the Base64 format
YOUR_USERNAME - your username in ClearSlide
YOUR_PASSWORD - your password for ClearSlide account with the username as above

curl -X POST 'https://oauth.platform.clearslide.com/oauth/token' \
--header 'Authorization: Basic YOUR_AUTHORIZATION_HEADER' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=password' \
--data-urlencode 'username=YOUR_USERNAME' \
--data-urlencode 'password=YOUR_PASSWORD'
Http URL - https://oauth.platform.clearslide.com/oauth/token
Http Method - POST
Http Header - Authorization: Basic YOUR_AUTHORIZATION_HEADER
Http Header - Content-Type: application/x-www-form-urlencoded'
Http Param - refresh_token: YOUR_REFRESH_CODE
Http Param - grant_type: refresh_token
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"85c51611-be05-491a-a137-c161adb906da",
"token_type":"bearer",
"refresh_token":"5230ab7e-1fc1-4a39-be7d-49e552f10f25",
"Expires_in":"3600",
"scope":"read write"
}

Step 2: Refreshing access token

In the below HTTP request, update three variables that are specific to a partner:

YOUR_AUTHORIZATION_HEADER = Encode the string "yourClientId:yourClientSecret" to the Base64 format
YOUR_REFRESH_TOKEN = your refresh token obtained while requesting the access token

curl -X POST 'https://oauth.platform.clearslide.com/oauth/token' \
--header 'Authorization: Basic YOUR_AUTHORIZATION_HEADER' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'refresh_token=YOUR_REFRESH_TOKEN' \
--data-urlencode 'grant_type=refresh_token'
Http URL - https://oauth.platform.clearslide.com/oauth/token
Http Method - POST
Http Header - Authorization: Basic YOUR_AUTHORIZATION_HEADER
Http Header - Content-Type: application/x-www-form-urlencoded'
Http Param - refresh_token: YOUR_REFRESH_CODE
Http Param - grant_type: refresh_token
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Cache-Control: no-store
Pragma: no-cache
{
"access_token":"85c51611-be05-491a-a137-c161adb906da",
"token_type":"bearer",
"refresh_token":"5230ab7e-1fc1-4a39-be7d-49e552f10f25",
"Expires_in":"3600",
"scope":"read write"
}