Difference between revisions of "Pocket Realms"
(Add note about the new bedrock realms page) |
|||
(10 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
+ | [[Category:Pocket_Minecraft]] | ||
+ | |||
+ | {{Box | ||
+ | |BORDER = #9999FF | ||
+ | |BACKGROUND = #99CCFF | ||
+ | |WIDTH = 100% | ||
+ | |ICON = | ||
+ | |HEADING = Heads up! | ||
+ | |CONTENT = This article is about the old Pocket Edition Realms service and is no longer updated. For the current realms service, see [[Bedrock Realms]]. | ||
+ | }} | ||
+ | |||
+ | |||
== Authentication == | == Authentication == | ||
Line 4: | Line 16: | ||
Steps to Login | Steps to Login | ||
− | *Pull authenticityToken from /m/login?app=mcpe | + | *Pull authenticityToken from /m/login?app=mcpe&version=0.7.6 |
*POST to /m/login | *POST to /m/login | ||
*Client is redirected to /m/launch | *Client is redirected to /m/launch | ||
Line 16: | Line 28: | ||
Request Parameters: | Request Parameters: | ||
− | *authenticityToken: Pulled from /m/login?app=mcpe | + | *authenticityToken: Pulled from /m/login?app=mcpe&version=0.7.6 |
*email: Email of user | *email: Email of user | ||
*password: Password of user | *password: Password of user | ||
Line 26: | Line 38: | ||
*sid: Pulled from mojangSessionId | *sid: Pulled from mojangSessionId | ||
*gameversion: Version of the game the requests are coming from | *gameversion: Version of the game the requests are coming from | ||
+ | |||
+ | Response: | ||
+ | |||
+ | <pre> | ||
+ | Logged in. | ||
+ | </pre> | ||
== Endpoints == | == Endpoints == | ||
Line 46: | Line 64: | ||
*playerNames: Usernames of players currently playing on the server | *playerNames: Usernames of players currently playing on the server | ||
*invited: Usernames of players who are invited to the server | *invited: Usernames of players who are invited to the server | ||
+ | *daysLeft: Unknown use | ||
Response: | Response: | ||
Line 59: | Line 78: | ||
"type":"survival", | "type":"survival", | ||
"playerNames":["Steve", "Stevie"], | "playerNames":["Steve", "Stevie"], | ||
− | "invited":["Steve", "Stevie"] | + | "invited":["Steve", "Stevie"], |
+ | "daysLeft": 0 | ||
}] | }] |
Latest revision as of 12:38, 6 June 2020
Heads up!
|
Contents
- 1 Authentication
- 2 Endpoints
- 2.1 GET /server/list
- 2.2 POST /server/{id}/join
- 2.3 POST /server/create?name={server_name}&type={type}&seed={seed}
- 2.4 PUT /server/{id}/name/{server_name}
- 2.5 PUT /server/{id}/open
- 2.6 PUT /server/{id}/close
- 2.7 POST /server/{id}/whitelist/{username}
- 2.8 DELETE /server/{id}/whitelist/{username}
- 2.9 POST /server/heartbeat?nplayers={num_players}
- 2.10 GET /auth/validate-player/{unknown_string}/{unknown_string}
- 2.11 GET /info/status
Authentication
Endpoint: https://account.mojang.com
Steps to Login
- Pull authenticityToken from /m/login?app=mcpe&version=0.7.6
- POST to /m/login
- Client is redirected to /m/launch
POST /m/login
Player Login
Parameters sent in body
Request Parameters:
- authenticityToken: Pulled from /m/login?app=mcpe&version=0.7.6
- email: Email of user
- password: Password of user
Pull mojangSessionId from the PLAY_SESSION cookie, and use that as the sid cookie in peoapi.minecraft.net requests. The mojangSessionId is also returned in a JSON key of sessionID with a request to /m/session
Cookies needed for peoapi.minecraft.net requests:
- sid: Pulled from mojangSessionId
- gameversion: Version of the game the requests are coming from
Response:
Logged in.
Endpoints
Endpoint: https://peoapi.minecraft.net
GET /server/list
List servers that user own or has been invited to
Response Parameters:
- serverId: Id of server
- name: Server Title
- open: Whether server is joinable
- ownerName: Name of server owner
- myWorld: Whether the server belongs to the current user
- maxNrPlayers: Max number of players
- type: Type of server, can be creative or survival
- playerNames: Usernames of players currently playing on the server
- invited: Usernames of players who are invited to the server
- daysLeft: Unknown use
Response:
[{ "serverId":1, "name":"Steve's Server", "open":true, "ownerName":"Steve", "myWorld":true, "maxNrPlayers":10, "type":"survival", "playerNames":["Steve", "Stevie"], "invited":["Steve", "Stevie"], "daysLeft": 0 }]
POST /server/{id}/join
Join a server
Request Parameters:
- id: Pulled from serverId on /server/list
Response Paramenters:
- ip: IP of server
- port: Port of server
- key: Key used to encrypt the data received on the server (AES-128 ECB)
Response:
{ "ip":"87.169.167.12", "port":21647, "key":"/6UAOMG6Q/EIjHxLa87un5l==" }
POST /server/create?name={server_name}&type={type}&seed={seed}
Create a server. (Not complete)
Request Parameters:
- server_name: Title of server
- type: Type of server, can be creative or survival
- seed: Seed for server
Response:
Response not yet documented
PUT /server/{id}/name/{server_name}
Change name of server (Not complete)
Request Parameters:
- id: Pulled from serverId on /server/list
- server_name: Title of server
Response:
Response not yet documented
PUT /server/{id}/open
Open server (Not complete)
Request Parameters:
- id: Pulled from serverId on /server/list
Response:
Response not yet documented
PUT /server/{id}/close
Close server (Not complete)
Request Parameters:
- id: Pulled from serverId on /server/list
Response:
Response not yet documented
POST /server/{id}/whitelist/{username}
Add username to whitelist (Not complete)
Request Parameters:
- id: Pulled from serverId on /server/list
- username: Username of player to add to the whitelist
Response:
Response not yet documented
DELETE /server/{id}/whitelist/{username}
Delete username from whitelist (Not complete)
Request Parameters:
- id: Pulled from serverId on /server/list
- username: Username of player to delete from the whitelist
Response:
Response not yet documented
POST /server/heartbeat?nplayers={num_players}
Exact use unknown (Not complete) (Most likely a POST)
Request Parameters:
- num_players: Number of players currently on server?
Response:
Response not yet documented
GET /auth/validate-player/{unknown_string}/{unknown_string}
Check whether username is authorized? (Not complete)
Needs the cookie key
Request Parameters:
- unknown_string: One of the values could be a username?
Response:
Response not yet documented
GET /info/status
Determines whether server creation is allowed
Response Parameters:
- buyServerEnabled: Whether server buying is enabled?
- createServerEnabled: Whether server creation is enabled?
Response:
{"serviceEnabled":true,"buyServerEnabled":false,"createServerEnabled":false}