The Web Services provides user authentication thanks to OAuth2.
We provide an official implementation for PHP: https://github.com/maniaplanet/oauth2-maniaplanet
response_type
: the value code
client_id
scope
: space separated list of scopesredirect_uri
: one the of the redirect URI mentioned in your Web Services applicationstate
: a non predictable random string. You should store this value and check if the same is returned at other stages.redirect_uri
with the query parameters:
code
state
: the state you provided at stage 1grant_type
the value authorization_code
client_id
client_secret
code
: from stage 2redirect_uri
: from stage 1 The answer will contain the keys:
token_type
: the value Bearer
expires_in
: an integer representing the TTL of the access tokenaccess_token
: the access tokenrefresh_token
: the refresh tokenSend a POST request to https://prod.live.maniaplanet.com/login/oauth2/access_token with the parameters:
grant_type
: the value refresh_token
refresh_token
: a refresh tokenclient_id
client_secret
scope
: a list of space separated scopesThe answer contains:
token_type
: the value Bearer
expires_in
: an integer representing the TTL of the access tokenaccess_token
: the access tokenrefresh_token
: the refresh tokenTo be used with user-agent-based clients that cannot keeps a secret.
response_type
: the value token
client_id
client_secret
redirect_uri
: one the of the redirect URI mentionned in your Web Services applicationscope
: a space separated list of scopesstate
redirect_uri
with the following parameters in the query string:
token_type
: the value Bearer
expires_in
: an integer representing the TTL of the access tokenaccess_token
: the access tokenIt should be used for machine to machine authentication.
grant_type
: the value client_credentials
refresh_token
: a refresh tokenclient_id
client_secret
scope
: a list of space separated scopesThe answer contains:
token_type
: the value Bearer
expires_in
: an integer representing the TTL of the access tokenaccess_token
: the access tokenThe available scopes are:
basic
: access to basic user information login, nickname and zone path.dedicated
: access to the list of dedicated servers of the playertitles
: access to the list of titles created by the playerevents
: access to the list of events of the playermaps
: access to the maps of the playeremail
: access to the player email