Forum

Browse topics, discover Works With Legrand community!

Authorization string OAuth 2.0 ?

Hello,

I would like to know how I can get the Authorization string OAuth 2.0 access token to try Home + Control API function, please ?

thanks

Hello Tyler,

When I try to connect to your application, I’m not asked to accept the scopes (which would be the first step when you copy/paste the URL in the browser). So I have 3 questions :
– Did you Subscribed to the Starter Kit ?
– What is the status of your application ? (Accepted, Waiting for approval, …)
– Are you sure your client_id is the correct one ?

Have a good day,
Leslie – Community Manager

I can not get the code from the white page html file.
please help me with a concrete example

  • This reply was modified 5 years, 1 month ago by Danye.

Hello Danye,

Can you show me the request you send?
(Please hide your personal information)
If it’s a web application you just have to make a right click -> display source code

Have a good day,
Leslie – Community Manager

Hello again Danye,

I saw you tried to send some code but it went in spams because putting direct HTML is forbidden on the forum (for security reasons).

In the information you retrieved you have : name='code' id='code' value='eyJraWQiOiJjcGltY29yZV8wOTI1MjAxNSIsInZlciI6Ij........

This value is your code.

Have a good day,
Leslie – Community Manager

Hi i try to create an mobile appication with OAuth autentication.

My request for get access_token is

https://partners-login.eliotbylegrand.com/authorize?client_id=4a8c6e2e-5916-4c85-a958-9636770616a5&response_type=code&redirect_uri=msal4a8c6e2e-5916-4c85-a958-9636770616a5://auth

If i load this link into browers, insert credentials and click on “accetta” , the page is stalled.

"legrand"

 

Hello Antonio,

You are specifying a redirect_uri with a custom URL scheme (msal4a8c6e2e-5916-4c85-a958-9636770616a5://auth)

During your test within a web browser, you can look closely to your dev tools and verify that the callback is done to this custom url scheme.

"screen"

You have to implement a way to catch this callback within your native development (lots of oauth2 libraries are available in order to help you)

Have a good day,

Leslie – Community Manager

Viewing 6 posts - 16 through 21 (of 21 total)

You must be logged in to reply to this topic.