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 codeclient_idscope: 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:
codestate: the state you provided at stage 1grant_type the value authorization_codeclient_idclient_secretcode: from stage 2redirect_uri: from stage 1 The answer will contain the keys:
token_type: the value Bearerexpires_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_tokenrefresh_token: a refresh tokenclient_idclient_secretscope: a list of space separated scopesThe answer contains:
token_type: the value Bearerexpires_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 tokenclient_idclient_secretredirect_uri: one the of the redirect URI mentionned in your Web Services applicationscope: a space separated list of scopesstateredirect_uri with the following parameters in the query string:
token_type: the value Bearerexpires_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_credentialsrefresh_token: a refresh tokenclient_idclient_secretscope: a list of space separated scopesThe answer contains:
token_type: the value Bearerexpires_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