Skip to content
GAMPEONCreate
New project

Start a sign-in with Steam or Discord

POST
/v1/auth/{provider}/start
curl --request POST \
--url https://api.gampeon.com/v1/auth/steam/start \
--header 'Content-Type: application/json' \
--data '{ "mode": "login", "nonce": "example" }'

Returns the address to send the browser to. The provider redirects back to the portal with state (and code for Discord, openid.* parameters for Steam), and the portal completes the sign-in with POST /v1/auth/{provider}/callback. The sign-in is valid for 10 minutes and can be used once.

mode: "link" connects the provider to the account you are logged in with (portal session required; access tokens are refused).

Not available with access tokens.

Rate limit: 30 per 15 minutes per IP.

provider
required

Sign-in provider

string
Allowed values: steam discord

Sign-in provider: steam or discord

Media typeapplication/json
object
mode
required

login: log in or sign up. link: connect to your account.

string
Allowed values: login link
nonce
required

Random value (22 to 128 characters A-Z a-z 0-9 _ -) that the client keeps in the browser session and sends again with the callback. Binds the sign-in to the browser that started it.

string
/^[A-Za-z0-9_-]{22,128}$/

Address at the provider

Media typeapplication/json
object
url
required
string format: uri
expiresAt
required

Unix time in milliseconds

integer format: int64

Example generated

{
"url": "https://example.com",
"expiresAt": 1
}

Error codes: invalid_field

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: unauthorized

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: token_not_allowed

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Error codes: provider_unavailable

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Limit: 30 per 15 minutes per IP. Error codes: rate_limited

Media typeapplication/json
object
error
required

Machine-readable error code, for example not_found or rate_limited.

string
message

Human-readable detail. Only present for some errors.

string

Example generated

{
"error": "example",
"message": "example"
}

Report a problem with this pageOther ways to give feedback