LIFX Developer Zone

Can not authenticate

#1

I am trying to authenticate my device with the api, but i get the error
{“error”:“invalid_client”,“error_description”:“Could not authenticate OAuth application.”}.

I have created a Token in https://cloud.lifx.com/settings and i have used this as client_id in the authorize endpoint.
https://cloud.lifx.com/oauth/authorize?client_id=MY_API_TOKEN&scope=remote_control:all&state=1234&response_type=code&redirect_uri=https://www.xxxx.com

What am i doing wrong?

#2

Hello,

The OAuth flow is used to generate the same kind of token you can create in the settings page.

This means that your token is already what you need to start making http calls to https://api.lifx.com with.

#3

Hello delfick, I’m trying to authenticate my app as well but I’m told I need client-id and client-secret. How can I obtain those from token I generated in settings page?

#4

OAuth tokens are created when you fill in the form mentioned by this page

#5

I knew about that form, but it says it’s only for large scale projects. I’m creating a simple prototype project for only my usage initially.

#6

In that case it’s best just to make it so you need to create your own api token in the settings page and input it into your application. Similar to how the “Try it Out” sections in the http api documentation works