oAuth2 refresh tokens and increase expire time of token?

Maniaplanet public API, ManiaConnect system and the open source PHP SDK.

Moderator: NADEO

Post Reply
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

oAuth2 refresh tokens and increase expire time of token?

Post by toffe »

Is it possible to get a refresh token? And a longer living access token?
Or how can I do a persistand connection without having to relogin into the oauth login page again?

Thanks,
Toffe
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: oAuth2 refresh tokens and increase expire time of token?

Post by magnetik »

You can ask for the scope "offline" to get a refresh token that you will be able to exchange for a code to get another token.

This part have not been used a lot, do not hesitate to ask if it does not work. :thumbsup:
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: oAuth2 refresh tokens and increase expire time of token?

Post by toffe »

magnetik wrote:You can ask for the scope "offiline" to get a refresh token that you will be able to exchange for a code to get another token.

This part have not been used a lot, do not hesitate to ask if it does not work. :thumbsup:
I think you mean offline :P. I think it works, atleast im getting a refresh token. Now lets see if I can get the data after some hours :P

Thanks :D
Toffe
User avatar
magnetik
Posts: 1673
Joined: 01 Feb 2012, 19:13
Location: Bordeaux
Contact:

Re: oAuth2 refresh tokens and increase expire time of token?

Post by magnetik »

toffe wrote:I think you mean offline :P.
:thumbsup:

The token is valid for 1h, after that you have to use your refresh token to get a code and a token.
ManiaPlanet technical documentation portal (Dedicated, ManiaLink, ManiaScript, Titles...) -- contribute!
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: oAuth2 refresh tokens and increase expire time of token?

Post by toffe »

Will it be possible to add scopes after the authorization took place? Is there some sort of function for that?


Thanks,
Toffe
User avatar
gouxim
Nadeo
Nadeo
Posts: 1186
Joined: 14 Jun 2010, 17:20

Re: oAuth2 refresh tokens and increase expire time of token?

Post by gouxim »

Nope, it wouldn't make sense since the authorization is precisely to authorize scopes to be accessed.
Please do not PM for support. Instead, create a thread so that everyone can contribute or benefit from the answer! 8-)
User avatar
toffe
Posts: 782
Joined: 15 Jun 2013, 10:57
Location: The Netherlands
Contact:

Re: oAuth2 refresh tokens and increase expire time of token?

Post by toffe »

Okay,Thanks
The offline is definitely working for me, thanks for your help guys!

Toffe
Post Reply

Return to “Maniaplanet Web Services”

Who is online

Users browsing this forum: No registered users and 1 guest