![]() ![]()
Hope you have found this informational & thanks for reading. I have used this light to build a Microsoft Teams status light, will post the link as soon as it is available. There is also SDK for C#, do look at it on this url for more details. ![]() Var response = await client.PutAsync(String.Format(requestUrl), requestData) Var requestData = new StringContent(payload, Encoding.UTF8, "application/json") Immediately after the above request, make the following HTTP request to create the User Nameīody-RAW: " Ĭ = new AuthenticationHeaderValue("Bearer", accessTokenPhilipsHue) User Name Creation:įind the HTTP request details to enable the Link button To enable this experience, there must be a username created first. CHROMA FOR HUE SEARCH FOR BRIDGE HOW TOLet us now see how to use the access token to turn on/off, change colours etc with the remote API endpoints. Till now we have seen how to register a remote API app, generate access token and to refresh it before it expires. For more details on the remote authentication, go through the documentation Control the Hue Lights using the generated Access token: Refresh_token=refreshtokenfromthefirstrequestīesides Basic authentication, Hue Remote API supports Digest method. Find below the request details using Basic Authentication The access token is valid only for 7 days, to use it beyond 7 days there must be a new access token generated using the Refresh token. Let us now see, how to refresh the access token. The Access token is approximately valid for 7 days and the refresh token for 100 days. CHROMA FOR HUE SEARCH FOR BRIDGE PASSWORDUsername should be ClientId of the App and Password should be ClientSecretįind below screenshot from Postman with the above HTTP POST request, make a note of the access token and refresh token from the response section of the request. CHROMA FOR HUE SEARCH FOR BRIDGE CODEReplace the code value with yours generated from the authorization grant request.Īuthorization Type: Basic Auth. URL: bsysFQ65 &grant_type=authorization_code To generate an access token using Basic Authentication, make the following HTTP request using Postman or any other tool To Deactivate an existing App or see all the list of existing apps, login to. Make a note of the code which will be used to generate access token. Once the app is trusted, there will be an authorization code automatically generated on the browser address bar as shown below DeviceName: The name of the app accessing the remote api.Īccess the URL in a browser, you will be prompted to accept or decline the permission grant to the created app.DeviceId: The device identifier must be a unique identifier in a string format for the app or device accessing the Hue Remote API.Per the above screenshot, it is myremotehueapp ![]() AppId: From the app registration, the name of the app.ClientSecret: From the app registration.To generate an access token, the first step is to generate an authorization code. To access a Philips Hue API endpoint to turn on/off or change colours of light, an access token is required. The next step is to generate the access token. Find below screenshot of the newly registered Remote Hue API appĬopy the ClientId & ClientSecret which will be required to generate access token for controlling the Hue lights. For the callback URL I have provided the Postman browser call back url facilitating OAuth 2.0 token generation from Postman. Click on the link Add new Remote Hue API appĪfter entering the App name, Callback URL and the description, click the Submit button. Add Remote Hue API App:Īfter logging in to the Philips Hue Developers Portal, access the URL to add the App. The first step is to create a Remote Hue API app which provides you with OAuth credentials to remote control the Hue lights. Register an account in the Philips Hue Developers portal.Hue bridge is a device which is the brain of the Philips hue smart lighting system that links the lights to the internet. In this blog post, let us see how to use the Philips Hue OAuth 2.0 remote API to integrate with the Power Platform for controlling the lights. On top of applications from Philips, the Hue system also enables OAuth 2.0 to allow third party integrations to connect to Hue system resources. Philips Hue is a smart lighting solution provider with range of smart lights that can be controlled with your smart devices like your mobile phone, Google Home, Alexa etc through the applications developed by Philips. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |