galaxyBETA
explore
· ·
log in

log me in

log in forgot password

don't have an account?

sign up

preferences

theme picker site-wide filters

authorized

The authorized response is returned after the user responds to the popup created by the authorize action.

From here, you’ll want to send the send the auth code to your game’s backend and exchange it for a token.

responding action

properties

  • error (boolean)
    Whether the action encountered an error.

  • message (string?)
    Present when error is true, tells the reason why the action encountered an error. Valid values are:

    • "no_account": The player was logged out.
    • "invalid_scopes": Invalid OAuth scopes were requested.
    • "invalid_app": The specified client ID was either not linked to an app, or the app was not made by you.
    • "underage_user": The account is marked as belonging to a person under 13, and thus OAuth is not allowed.
    • "access_denied": The player disallowed authorization.
    • "server_error": The game couldn’t connect to Galaxy’s servers.
    • "already_requested": The game already sent an authorize action on this page load.
  • code (string?)
    The authorization code returned by Galaxy.

examples

If the authorization was successful:

{
	type: "authorized",
	error: false,
	code: "kkx7WIUIrtOD_w3nP4UFSf3il-iUOxBAu0Gb1eolwt8"
}

If it wasn’t:

{
	type: "authorized",
	error: true,
	message: "access_denied",
}