🔏
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. API Endpoints

Toggle Door

Open/Close a Door

POST https://app.beamlabs.io/api/oauth/v1/endpoints/toggle

Open or close a single door for a user.

Headers

Name
Type
Description

Accept

string

Always set to application/json

Content-Type

string

Aways set to application/json

Authorization

string

Set to Bearer <ACCESS_TOKEN>

Accept-Charset

string

Always set to utf-8

Accept-Encoding

string

Always set to gzip

Request Body

Name
Type
Description

door_state

string

Requested state of the door, either "OPEN" or "CLOSED"

door_id

string

UUID of door to open or close

{
    "success": true,
    "timestamp": 123123123123,
    "message":, "200"
}
{
    "success": true,
    "timestamp": 123123123123,
    "message":, "Error communicating with $hardware_name. Malformed Request. (400)"
}
{
    "success": true,
    "timestamp": 123123123123,
    "message":, "Error communicating with $hardware_name. Authentication error. (401)"
}
{
    "success": true,
    "timestamp": 123123123123,
    "message":, "Sorry, your $hardware_name can't be found. Please unplug the $hardware_name and then plug it back in."
}
{
    "success": true,
    "timestamp": 123123123123,
    "message":, "Your $hardware_name requires pairing a door sensor before the request can be processed. (428)"
}
{
    "success": true,
    "timestamp": 123123123123,
    "message":, "Error communicating with $hardware_name. Not Implemented error. (501)"
}

The /toggle endpoint is used to open or close the specified garage door. In the request, you must specify the UUID of the door plus the requested state (ie. "OPEN" or "CLOSED"). The Controller ultimately decides how to process the TOGGLE request depending on the current known state of the specified door.

An example request may look like:

POST /api/oauth/v1/endpoints/toggle HTTP/1.1
Host: https://garageio.com
Content-Type: application/json
Accept: application/json
Authorization: Bearer <ACCESS_TOKEN>
Accept-Charset: utf-8
Accept-Encoding: gzip

{ "door_id": "cbd3nb34877293484bcccbbd29393", "door_state": "OPEN" }
PreviousGet User DevicesNextInvite User (internal)

Last updated 4 years ago

where is a valid access token. The body of the request must be valid JSON and both of the fields are required. The door_id field comes from the data of the endpoint. The door_state field should be thought of as requested state of the door. It has two valid values: OPEN (to request the door to open) and CLOSED (to request the door to close).

/sync