How-to make authorized Buoy API requests for trial usage

📘

This page is only applicable to trial users. For early stage Sandbox development or Production usage, machine-to-machine (M2M) authorization should be used instead. Contact your Buoy technical project manager for more details.

Buoy's Postman collection abstracts away most of the setup described here and is a simpler approach for making authorized Buoy API requests in the Sandbox environment.

Overview

Buoy supports the Authorization Code with PKCE flow for authenticating to our API for trial usage. The steps here will describe how to obtain an access token in the browser in order to make authorized Buoy API requests. In order to interact with Buoy’s API, authentication credentials must be provided.

Upon contracting with Buoy, you will migrate to using machine-to-machine (M2M) tokens.

Obtaining an access token in the browser

To obtain an access token (or Bearer token):

  1. Access the universal sign-up and log-in page here, replacing <CLIENT_ID> with the Client Id provided to your organization:
    https://auth.sandbox.buoyhealth.com/authorize?response_type=token&client_id=<CLIENT_ID>&redirect_uri=https://www.buoyhealth.com/callback/&prompt=login&screen_hint=signup&audience=https://api.sandbox.buoyhealth.com
  2. Log in or create an account on the Sign up / Log in page.
  3. The access token will be contained in the redirected URL in your browser. The URL will look like this: https://www.buoyhealth.com/callback/#access_token=&expires_in=7200&token_type=Bearer.
  4. Copy the retrieved access token and include the it in all Buoy API requests using the "Authorization" header in the form "authorization: Bearer <access_token>"

For example, a Bearer token could be included in a Buoy API request using the command line tool cURL like so:

curl --request GET \
  --url https://api.sandbox.buoyhealth.com/symptom-checker/v2/queries/ \
  --header 'authorization: Bearer <access_token>'

If your organization intends to use Buoy API in a production application, follow the How-to make authorized Buoy API requests from an M2M app guide.