Use Kindful for Oauth/SSO

Grant Kindful user's access to your application using their Kindful login details

Create a developer account by going to
https://<your-organizations-subdomain>.kindful.com/developers/sign_up

When you create an account, please reach out to support@kindful.com for access to create an application. Our team usually takes less than 24 hours to approve. Request access at support@kindful.com.

The Kindful Developer Account is different than a Kindful Partner account.

Create an OAuth Application

Sign in to your developer account and then click "Create Application".

Here you name your application, assign its redirect URI(s), and there are a few options:
1) Only authorize users if they have a membership.
2) If authorization only for members is on, you can restrict it to a specific campaign that their membership is associated with.

URL's are required to be https

Crafting Authorize Link

The link to initiate authorization should contain your subdomain, client_id (application_id) and redirect_uri

https://<organization-subdomain>.kindful.com/oauth2/authorize?response_type=code&client_id=APPLICATION_ID&redirect_uri=REDIRECT_URI"

Example response that will come as a parameter on your redirect_url

{
  code: KINDFUL_AUTHORIZATION_CODE
}

Retrieving the OAuth token

POST https://app.kindful.com/oauth2/token
  --client_id: APPLICATION_ID
  --client_secret: APPLICATION_SECRET
  --code: KINDFUL_AUTHORIZATION_CODE
  --grant_type: 'authorization_code'
  --redirect_uri: REDIRECT_URI
  

Example Response

{
  "access_token": "ACCESS_TOKEN",
  "token_type": "bearer",
  "expires_in": "2508735",
  "scope": "basic",
  "created_at": "1474577889"
}

Authorization

When the user signs into Kindful, an access_token will be sent back.

Retrieve User Details

Authentication Headers

Content-Type: application/json
Authorization: Bearer <access_token>

A user's details can be retrieved by hitting

https://<organization-subdomain>.kindful.com/oauth2/api/v1/details

Response:

Field
Descripition

name

User's name

email

User's email

id

Kindful identifier for user

Additional fields may be setup for your organization to identify membership levels. For example, you could use custom field values to indicate membership levels.

Use Kindful for Oauth/SSO

Grant Kindful user's access to your application using their Kindful login details