API Authorization & Setup

How to obtain your access token to authenticate your api calls

Authorization Guide

To use the Nutrition Hub APIs, you need to obtain a Bearer Token using your API key. Follow the steps below to authorize your API requests.

Obtain Bearer Token

Endpoint: POST

https://api.passiolife.com/v2/token-cache/unified/oauth/token/<YourKeyHere>

Path Parameters:

  • key: Your API or license key provided in your product dashboard.

Response Schema:

  • access_token (string): The Bearer Token you will use to authorize your API requests.

  • expires_in (number): Token expiration time in seconds.

  • scope (string): The scope of the token.

  • token_type (string): The type of the token, typically "Bearer".

Example Request:

POST
https://api.passiolife.com/v2/token-cache/unified/oauth/token/<YourKeyHere>

Example Response:

jsonCopy code{
  "access_token": "your_access_token_here",
  "expires_in": 3600,
  "scope": "read write",
  "token_type": "Bearer"
}

Using the Bearer Token

Include the access_token in the Authorization header for all your API requests. The only required header is the Authorization header with the Bearer token.

Example Authorization Header:

Authorization: Bearer your_access_token_here

Last updated