Skip to main content

Overall

caution

Local API is only available for Local Hub

SVR_URL: http://{Your Local Hub IP Address}:1080
ClientId and ClientSecret are obtained in YoLink APP > Local Hub > Local Network > Integrations > Local API

HTTP API

Post /open/yolink/v2/api

Request Header

ParamsValueDescription
Content-Typeapplication/jsonJSON Formatted
AuthorizationBearer Token <Necessary>Access Token

Request Body

JSON of BDDP

Response Body

JSON of BUDP

You can obtain access token through the following token interface (refresh_token and expires_in included too)

tip

It's recommend that confirm the access_token is not expired before calling the API with access_token. It's also recommend using refresh_token to get a new access_token in preference

OAuth2.0

ItemValue
Token URL${SVR_URL}/open/yolink/token
//Get access token
curl -X POST -d "grant_type=client_credentials&client_id=${ClientId}&client_secret=${ClientSecret}" ${SVR_URL}/open/yolink/token
//Get access token by refresh_token
curl -X POST -d "grant_type=refresh_token&client_id=${ClientId}&refresh_token=${Refresh Token}" ${SVR_URL}/open/yolink/token