Create an OAuth Client
Create a personal OAuth client and use its access token to call the Dot. device API.
Use a personal OAuth client to get an access token for server-side scripts that connect to and manage devices on your Dot. account.
Create a client
- Open More → API Keys & OAuth in the Dot. App or My account → API Keys & OAuth on the web.
- Under OAuth clients, select Create OAuth client and enter a name.
- Copy the client ID and client secret and store them on your server. The secret appears only when you create the client.
Each account can create up to 10 OAuth clients.
Get an access token
Use HTTP Basic authentication on your server to exchange the ID and secret for an access token with the client_credentials grant. This example requests permission to list devices. Omitting scope requests all scopes assigned to the client. Your account’s current device permissions still apply.
curl --user "$DOT_CLIENT_ID:$DOT_CLIENT_SECRET" \
--data 'grant_type=client_credentials' \
--data 'scope=dot.devices:read' \
https://dot.mindreset.tech/api/authV2/oauth2/tokenCall the device API
Send Authorization: Bearer <access_token> to the Device List API. Use the same client to request another token when it expires. To replace a client secret, reset it under API Keys & OAuth on the web and update your integration.
Did this solve your problem?
Join our community