Email Us

Registering Users

Learn how to manage access tokens to link your users accounts with Point Database.

🔥 Please do not store your apiKey in your client application. This is meant to be used at a backend to backend communication.

Creating a Point user

POST https://${env}.sdk.areyoupoint.com/organizations/users/${userId}
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${apiKey}

⚠️ Use a user id that can identify your user in your application. Please ensure that the id is unique and do not include user personal information on them, such as email addresses for example.

📝 ${env} can be staging or production.

200 Response

{
  "user": {
    "id": "pointUserId",
    "email": null,
    "birthday": null,
    "height": null,
    "weight": null,
    "gender": null,
    "pronoun": null,
    "expectation": null,
    "firstName": null,
    "timezone": null,
    "refreshToken": {
      "token": "<refresh-token>"
    }
  }
}

Each user has a unique refreshToken that does not have an expiration time.

Retrieving a Point user

GET https://${env}.sdk.areyoupoint.com/organizations/users/${userId}
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${apiKey}

Important: The user id is the same as the one from your organization, used to create the user.

${env} can be staging or production.

200 Response

{
  "user": {
    "id": "pointUserId",
    "email": null,
    "birthday": null,
    "height": null,
    "weight": null,
    "gender": null,
    "pronoun": null,
    "expectation": null,
    "firstName": null,
    "timezone": null,
    "refreshToken": {
      "token": "<refresh-token>"
    }
  }
}

Getting an access token for a specific user

Generates an access token valid for a specific user.

POST https://${env}.sdk.areyoupoint.com/organizations/users/${pointUserId}/access_token
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${refreshToken}

200 Response

{
  "accessToken": {
    "token": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJwb2ludHwtb1BIbllUaEc2NFVGX0ZCMV8yNmwiLCJpYXQiOjE2NDUxMzc2MDcsImV4cCI6MTY0NTE0MTIwN30.8eIpFc01hpj0Mid325kvJlouQi8aLTBw93q3whwRtpM",
    "expiresIn": 86400
  }
}

The tokens have a default expiration time of 24 hours (86400 seconds).

Revoking an access token

Revokes a specific access token.

DELETE  https://${env}.sdk.areyoupoint.com/organizations/users/${pointUserId}/access_token/${accessToken}
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${accessToken}

Creating a new refresh token

Generates a refresh token valid for a specific user.

POST  https://${env}.sdk.areyoupoint.com/organizations/users/${pointUserId}/refresh_token
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${apiKey}

200 Response

{
    "refreshToken": {
        "token": "<refresh-token>"
    }
}

Revoking a refresh token

Revokes the current refresh token for a specific user.

DELETE  https://${env}.sdk.areyoupoint.com/organizations/users/${pointUserId}/refresh_token
Host: ${env}.sdk.areyoupoint.com
Content-Type: application/json
Accept: */*
Authorization: Bearer ${refreshToken}

Next Steps

Learn more about our Health Data Intelligence.

Connect with Us

Terms & Conditions | Privacy Policy © 2023 Point® (Key Point Technologies, Inc.)