# Server Credentials (Backend Sign-In)

## Goal

Fetch platform-issued server credentials and send them to your backend for validation/sign-in.

## Prerequisite

Make sure the player is authenticated first. Use `use-case-1-auth-bootstrap.md`.

## Actions used

* `GameServicesLoadServerCredentials`
* `GameServicesGetLoadServerCredentialsSuccessResult` (on success)
* `GameServicesGetLoadServerCredentialsError` (on failure)

## Flow

1. State: `LoadServerCredentials`
   * Action: `GameServicesLoadServerCredentials`
   * (Optional) Input: `additionalScopes` (comma-separated enum names)
   * Events:
     * `successEvent` → `GetServerCredentials`
     * `failureEvent` → `GetLoadServerCredentialsError`
2. State: `GetServerCredentials`
   * Action: `GameServicesGetLoadServerCredentialsSuccessResult`
   * Read platform fields:
     * Android: `androidServerAuthCode`
     * iOS: `iosPublicKeyUrl`, `iosSignature`, `iosSalt`, `iosTimestamp`
3. Send the extracted fields to your backend and complete your server-side sign-in flow.

## Notes

* Values are platform-specific; expect the unused platform fields to be empty.
* Keep this flow separate from gameplay-critical paths; it’s typically a “connect account” feature.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://assetstore.essentialkit.voxelbusters.com/features/game-services/playmaker/use-cases/use-case-5-server-credentials.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
