Complete a sign-in with Steam or Discord
const url = 'https://api.gampeon.com/v1/auth/steam/callback';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"state":"example","nonce":"example","code":"example","params":{"additionalProperty":"example"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.gampeon.com/v1/auth/steam/callback \ --header 'Content-Type: application/json' \ --data '{ "state": "example", "nonce": "example", "code": "example", "params": { "additionalProperty": "example" } }'Checks the answer of the provider and then, depending on the mode and on whether the provider account is already connected:
result: "login": a session for the connected account.result: "signup": the provider account is not connected yet. UseticketwithPOST /v1/auth/signupwithin 30 minutes. An existing account with the same email address is never connected automatically: log in to it and connect the provider instead.result: "linked": connected to your account (modelink, with the session of the same account).
No access tokens of the provider are stored. Discord tokens are revoked right after reading the user ID.
Not available with access tokens.
Rate limit: 30 per 15 minutes per IP.
Authorizations
Section titled “Authorizations”- None
- session
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Sign-in provider
Sign-in provider: steam or discord
Request Bodyrequired
Section titled “Request Bodyrequired”object
state from the provider’s redirect
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.
Discord only: code from the redirect
Steam only: all openid.* query parameters of the redirect, unchanged
object
Example generated
{ "state": "example", "nonce": "example", "code": "example", "params": { "additionalProperty": "example" }}Responses
Section titled “Responses”Signed in, sign-up needed, or connected
object
Bearer token for the Authorization header
Unix time in milliseconds
object
object
Sign-in provider
Profile page at the provider
Shown on your public profile. Never for accounts under 16.
Unix time in milliseconds
Example
{ "result": "login"}Error codes: invalid_field, invalid_state, invalid_response, cancelled
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: token_not_allowed, email_unverified
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: provider_unavailable
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: identity_taken, already_linked
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Limit: 30 per 15 minutes per IP. Error codes: rate_limited
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}Error codes: provider_error
object
Machine-readable error code, for example not_found or rate_limited.
Human-readable detail. Only present for some errors.
Example generated
{ "error": "example", "message": "example"}