Advanced - Use Kindful for OAuth/SSO
Kindful supports providing authentication for a non-profit's contacts.
Gaining Access to this feature
Based upon your Kindful subscription, you may request access to Kindful for authenticating contacts into your third party membership portal using Kindful's oauth. Please request access through this link: https://bekindful.typeform.com/to/a7GU9E
Someone will get back with you shortly, within 2 business days. If your account includes access to this feature, you will be instructed how to create a "Developer Account".
The Kindful Developer Account is different than a Kindful Customer/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:
- Only authorize users if they have a membership.
- 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 performing a GET request to https://<organization-subdomain>.kindful.com/oauth2/api/v1/details
Sample Response
{
"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.