Skip to main content

Manage access control for applications

Last updated on September 29, 2026

Introduction​

AccelByte Gaming Services (AGS) defines an Identity and Access Management (IAM) client as an application, such as a game server or website, that requests access to protected platform resources. IAM clients enable you to control which resources an application can access, as opposed to a user.

This article contains information on:

  • How IAM clients work and IAM client types.
  • Creating and configuring IAM clients and their permissions in the AGS Admin Portal or with the AGS CLI.
  • Retrieving an application access token using AGS SDKs or the AGS CLI.

Prerequisites​

  • Access to the AGS Admin Portal and the permissions for IAM clients management.

    AGS Public Cloud

    Having the Studio Admin or Game Admin role in your AGS account allows you to directly manage IAM clients in the Admin Portal.

  • To follow the AGS CLI steps, you have installed the AGS CLI and signed in with an account that has the permissions above. See Install and sign in. The examples use a Bash shell.

How IAM clients work​

AGS IAM clients implement the OAuth 2.0 framework. You can define this under the publisher or game namespace, depending on whether the intended application is specific to one of your games or used by your publisher platform.

IAM client types​

There are two client types based on the OAuth 2.0 Client Type framework:

  • A confidential client requires a combination of Client ID and Client Secret to authorize on the backend. You need confidential clients when you need server-to-server (S2S) calls to admin endpoints in AGS. As a result, you will typically define specific access permissions on the client. Therefore, you should only use confidential clients in cases where you can control who has access to the client's ID and secret to prevent unauthorized users from accessing your services.
  • A public client does not specify a client secret; you only need the client ID. Public clients are best for applications that require a user to log in with their user account and only need client-to-server calls to public endpoints in AGS. In this case, the access permissions come from the user's account via Role.

Most used IAM clients​

Here are the most used IAM client archetypes:

  • Game client: configure IAM clients for game clients as Public in most cases.
  • Dedicated game server: configure IAM clients for dedicated servers as Public or Confidential. However, you need to assign permissions to the client if your dedicated servers don't log in as a user. This is the most common case.
  • Dedicated server uploader: IAM clients for uploading dedicated server builds. Since access for uploaders is usually tightly controlled, it is best to specify these types of clients as Confidential.

Manage IAM clients​

This section covers how to create an IAM client, edit it, and manage its permissions.

Create an IAM client​

  1. In the AGS Admin Portal, go to your namespace.

  2. On the sidebar, select Foundations > Identity & Access > IAM Clients.

  3. On the IAM Clients page, click Create New. The What is this client for? window appears.

    Image shows the IAM Clients page with the Create New button

  4. Select the template that matches the purpose of your client, then click Continue. A template sets the client type, a default client name, and a Redirect URI. Some templates also preselect the permissions that the client needs.

    Image shows the What is this client for window with the IAM client templates

    TemplateClient typeUse it forPreselected permissions
    Player Sign-inPublicGames, launchers, or web apps where players sign in with their own accounts.None
    Dedicated ServerConfidentialServer-to-server gameplay services that call AGS APIs directly.Matchmaking backfill and Session game session
    Build and Deploy ToolConfidentialCI/CD or upload tools that publish builds or run deployment tasks.AMS dedicated server, dedicated server toolkit, and watchdogs
    Trusted Backend ToolConfidentialTrusted backends or internal tools that need confidential AGS access.None
    CustomYour choiceClients that you want to set up yourself.None
    note

    The Dedicated Server and Build and Deploy Tool templates only appear if your namespace has the Multiplayer package.

    The New IAM Client page appears.

  5. If you selected Custom, choose a Client Type: Public or Confidential. For more information, refer to IAM client types. If you selected any other template, the template sets the client type for you.

    Image shows the Client Type section of the New IAM Client page

  6. In the Basic Info section, fill in the following information:

    • Client Name: type in a name for the client. AGS uses this name to identify the IAM client in user-facing forms and documents.
    • Secret (confidential clients only): this serves as the password for the client. Type in your own secret following the recommended format, or click Generate to have AGS create one for you.
    • Description (optional): describe the function of the IAM client.

    Image shows the Basic Info section with the Client Name, Secret, and Description fields

  7. In the Client Settings section, fill in the following information:

    • Redirect URI: the URI that AGS redirects the user to after they are authorized. Choose one of the following:

      • Localhost: for non-web-based clients, such as game servers, game clients, or server uploaders. This sets the URI to http://127.0.0.1. Enter a port only if your app listens on one.
      • Custom URL: for web-based clients, such as websites or launchers. Enter the full URL, including http:// or https://.
      tip

      You can add multiple URIs by clicking Add More.

    • Platform (public clients only, optional): select the third-party platform the SDK client runs on. If you don't want to bind the client to a third-party platform, leave it blank.

      note

      AGS uses this platform information for cross-platform features, such as cross-platform virtual currency and wallet.

    Image shows the Client Settings section with the Redirect URI and Platform fields

  8. (Optional) In the Advanced Configurations section, click Show configurations to override the default behavior of the IAM client:

    • Scope: a mechanism in OAuth 2.0 that limits which resources an IAM client can access. To learn more, see the OAuth 2.0 documentation. Choose one of the following:

    • Target Audience (optional): limits tokens from this client so they can only be used with specific backend services. Each entry in the dropdown represents a target service by its Base URI.

      note

      This serves as an allowlist so backend services can quickly reject connection attempts before checking client or user permissions. When the IAM client attempts to access a service endpoint, the service first checks the client's Target Audience list. The system rejects the connection attempt if the service's URI does not match the Base URI of any of the clients in the Target Audience field. If the client passes the Target Audience check, or if the client's Target Audience field is empty, the service proceeds to the next authentication step, such as checking its permissions and scopes.

    • Base URI (optional; works together with Target Audience): the base URI of the application that uses this client. This helps ensure that tokens are intended for the correct app.

    • Override Expiration Time: switch on this toggle to override the default Access Token and Refresh Token expiration times and set your own values. The access token must be between 1 second and 24 hours, and the refresh token must be between 1 minute and 30 days.

    Image shows the Advanced Configurations section with the Scope, Target Audience, Base URI, and Override Expiration Time fields

  9. (Confidential clients only) In the Permissions section, find the permissions that you want to add to the client. For each permission, tick the actions (Create, Read, Update, and Delete) that you want it to have. To select every permission in a group at once, tick the checkbox next to the group name. To find permissions faster, use the search field or select Show selected only. You can also add custom permissions here. See Add and edit IAM client permissions.

    Image shows the Permissions section with the search field, Show selected only checkbox, and permission groups

    You can skip this step and add permissions later.

  10. Create the client:

    • For a public client, click Create.

    • For a confidential client, click Continue. The Save your client secret window appears. Click Copy secret and store the secret in a secure place. Then, tick I have copied and stored this client secret securely and click Create.

      warning

      After you create the client, the client secret is no longer visible or accessible.

      Image shows the Save your client secret window with the Copy secret button

    The new IAM client is created with a system-generated client ID, which cannot be edited.

Edit an IAM client​

  1. On the Admin Portal sidebar, go to Foundations > Identity & Access > IAM Clients. The IAM Clients page appears.
  2. From the list, click the name of the IAM client you want to edit. The details page of the IAM client appears.
  3. Click Edit. The Edit Client page appears.
  4. Edit the information as needed. You can't change the client type or the client secret after you create the client.
  5. Click Save to save your changes.

Add and edit IAM client permissions​

You can add and edit the permissions of an existing confidential IAM client.

To add and edit the permissions of an IAM client in the AGS Admin Portal, follow these steps:

  1. In the AGS Admin Portal, go to your namespace.

  2. On the sidebar, select Foundations > Identity & Access > IAM Clients. The IAM Clients page appears.

  3. From the list, click the name of the IAM client with the permissions you want to update. The details page of the IAM client appears.

  4. Click Edit. The Edit Client page appears.

  5. Scroll down to the Permissions section to manage the permissions:

    • Find the permissions that you want to add or edit. Tick or untick the actions (Create, Read, Update, and Delete) that you want to add to or remove from the permission. To select every permission in a group at once, tick the checkbox next to the group name. To find permissions faster, use the search field or select Show selected only.

      Image shows the Permissions section with the search field, Show selected only checkbox, and permission groups

  6. Click Save to save your changes.

    note

    Permission changes take effect automatically on the next token refresh. To apply them right away, restart your connected services.

Get application access token​

Get application access token using AGS SDKs​

A Credential client requires a valid access token for service-to-service (S2S) calls to AGS.

The code below generates a valid access token using AGS SDK for a Credential client.

bool bServerLoggedIn = false;
bool bServerLoginComplete = false;
auto ServerApiClient = AccelByteOnlineSubsystemPtr->GetServerApiClient();
ServerApiClient->ServerOauth2.LoginWithClientCredentials(FVoidHandler::CreateLambda([&bServerLoggedIn, &bServerLoginComplete]()
{
UE_LOG(LogAccelByteEcommerceTest, Log, TEXT("Server Login Success"));
bServerLoginComplete = bServerLoggedIn = true;
}), FErrorHandler::CreateLambda([&bServerLoggedIn, &bServerLoginComplete](int32 ErrCode, FString const& ErrMsg)
{
UE_LOG(LogAccelByteEcommerceTest, Error, TEXT("Server Login Success"));
bServerLoginComplete = true;
}));
WaitUntil(bServerLoginComplete, "Waiting for server logged in...");

Get application access token using the AGS CLI​

To get an access token for a confidential client, sign in to the AGS CLI with the client credentials grant, then print the token:

ags auth login --grant client-credentials
ags auth token

The login command prompts for any value that you don't set with the AGS_BASE_URL, AGS_CLIENT_ID, and AGS_CLIENT_SECRET environment variables. For more information, see Install and sign in.

Get application access token using a manual API call​

If you simply want to perform API testing using Confidential Client, you can manually create an application access token by following the guide Get authorized in OpenAPI