🔏
API Docs
  • Beam API Docs
  • Overview
    • About Beam
    • API Requirements
    • Roles and Permissions
  • Getting Started
    • Requesting an Account
    • Using RESTful Tools
    • Webhooks
  • The Basics
    • Entities
    • Best Practices
    • Testing Accounts
  • OAuth
    • Overview
    • How to Authorize Access
      • Step 1: Generate Authorization URL
      • Step 2: Handle Authorization Response
      • Step 3: Request an Access Token
      • Step 4: Call API Endpoints
      • Step 5: Refresh the Tokens
  • API Endpoints
    • Overview
    • Get User Devices
    • Toggle Door
    • Invite User (internal)
    • Get Toggle History
    • Get User Info
    • Get User Settings
Powered by GitBook
On this page
  1. OAuth
  2. How to Authorize Access

Step 5: Refresh the Tokens

PreviousStep 4: Call API EndpointsNextOverview

Last updated 4 years ago

To refresh the access token and, consequently, the refresh token, make the following request using the most recent refresh token:

The request must follow this format (line breaks added for clarity):

https://app.beamlabs.io/oauth/v2/endpoints/token/?
    client_id=<CLIENT_ID>&
    client_secret=<CLIENT_SECRET>&
    grant_type= authorization_code&
    refresh_token=<REFRESH_TOKEN>&
    grant_type=refresh_token

where <REFRESH_TOKEN> is a valid refresh token received from Step 3.

Using a prototype tool to test? If you are using a tool, such as POSTMAN to test, read section for known issues.

Using RESTful Tools