Skip to main content

Legal Agreements

Last updated on April 23, 2024

Overview

The Legal Agreements service provided by AccelByte Gaming Service (AGS) has the power to manage legal documents such as Terms of Service (ToS), Privacy Policy, End User License Agreement (EULA), and marketing preferences such as whether a player would like to receive updates via email. You can create and manage documents with different versions and locales and store them in the AGS Admin Portal.

Legal Agreements can be uploaded to either a game namespace or your publisher namespace. Any agreements uploaded to your publisher namespace will be applied to all of your games in Player Portal or Launcher, and players will only need to agree to them once when creating their account for your platform.

AGS Starter

Legal Agreements is only available in game namespaces for AGS Starter.

Permissions

Permissions are used to grant access to specific resources within our services. Make sure your account has the permissions in the table below before you attempt to manage legal agreements in the Admin Portal.

UsagePermission TagAction
Create a legal documentADMIN:NAMESPACE:{namespace}:LEGALCreate
Update a legal documentADMIN:NAMESPACE:{namespace}:LEGALUpdate
Create a country-specific policyADMIN:NAMESPACE:{namespace}:LEGALUpdate
Create a new version of a documentADMIN:NAMESPACE:{namespace}:LEGALCreate
Edit document version detailsADMIN:NAMESPACE:{namespace}:LEGALUpdate
Publish a document versionADMIN:NAMESPACE:{namespace}:LEGALUpdate
Retrieve policies by countryADMIN:NAMESPACE:{namespace}:LEGALRead
Retrieve a document contentADMIN:NAMESPACE:{namespace}:LEGALRead

Permissions work slightly different depending on whether they are assigned to IAM Clients or Roles assigned to users. For more information, read the Authorization documentation.

To use AGS's Legal Agreements service, you must create a legal document in the AGS Admin Portal. This document acts as a container that you can upload the actual contents of the document into. To create this document, follow the steps below.

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page, you can see a list of all existing legal documents. To create a new document, click the + Create Document button.

  3. The Create Document form appears. Fill in the required fields:

    • Document Name: Input a name for the legal document. Only letters and spaces are allowed.

    • Document Type: Choose the type of document you're creating from the dropdown menu.

      • Legal Document: Documents such as Privacy Policies or Terms and Conditions.
      • Marketing Preference: Marketing preferences such as the option for players to sign up for a newsletter.
    • Country: Select the countries that you want to create country-specific policies for later from the dropdown menu. The first country that you input will be the default country, so the documents uploaded later for this country will also apply to all countries that do not have their own country-specific policies.

      IMPORTANT

      You won't be able to delete countries later, so make sure your selections are correct before submitting this form.

    • Tags (Optional): Input tags for the document. Tags can be used to classify documents.

    • Clients (Optional): Select the client this legal document will be applied to. In the publisher namespace, this could be Player Portal or Launcher, whereas in the game namespace this could be Steam, PSN, or other platforms. If left blank, the legal document will not appear in any platform.

      tip

      You can add additional clients to the legal document after it's created by opening the document and clicking Add More… next to Client.

    • Description: Input a description of the document.

  4. When you're finished, click the Create button. The new document will be added to the list.

You can edit an existing legal document by following the steps below:

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page, you can see a list of all existing legal documents. Choose the document you want to update and click Update in the Action column next to it.

  3. In the Update Document form that appears, make the desired changes. If necessary, use the previous section for help filling out the fields.

  4. Once completed, click the Edit button. The document will be updated.

Create a country-specific policy

After creating a legal document, you can create a country-specific policy to hold special versions of that document that are for specific countries. The countries that were entered when a legal document was created or edited will be listed as countries that require a specific version of that document. To add a new country-specific policy to that list, follow the steps below.

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page, you can see a list of all existing legal documents. Choose the document to which you want to add a country-specific policy and click View in the Action column next to it.

  3. On the Legal Document Details page, you can see detailed information about the selected legal document and the list of country-specific policies related to that document. To create a new country-specific policy, click the + Add Policy button.

  4. On the Add Policy form that appears, choose a country from the dropdown and click Create.

  5. You'll be redirected to the country-specific policy page that you just created. To set this country as the default country for country-specific policies, click the Set as Default button.

  6. If you want to require players to accept this policy before continuing to use the platform, select the Mandatory Update checkbox.

Create a new version of a document

After creating a country-specific policy, you can add a new version of that document anytime it's revised. To create a new version of a document, follow the steps below.

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page you can see a list of all existing legal documents. Choose the document to which you want to add a new version and click View in the Action column next to it.

  3. On the Legal Document Details page, you can see detailed information about the selected legal document and the list of country-specific policies related to that document. To create a new version of a country-specific policy, click View in the Action column next to the country-specific policy you want to add a version to.

  4. On the Policy Details page of the country-specific policy you chose, you can see information about the policy and its existing versions. To create a new version of the document, click the + Create a Version button.

  5. On the Create Version form that appears, enter a name for the new version in the Version Name field.

  6. Click the Create button. The new document version will be created.

  7. To add content to a document version, click View in the Action column of that version.

  8. On the Version Details page, you can see detailed information about the selected document version. To add content to this version, click the Create New button.

  9. On the Create Locale form that appears, choose the language the document is in from the Locale dropdown. Then, click the Browse button to find the document on your computer and upload it. The file should be a .md or .html file.

  10. Click the Create button. The selected file will be uploaded.

Edit a document version

You can edit the content of a legal document. To do so, follow the steps below.

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page, you can see a list of all existing legal documents. Choose the document to which you want to add a new version and click View in the Action column next to it.

  3. On the Legal Document Details page, you can see detailed information about the selected legal document and the list of country-specific policies related to that document. Click View in the Action column next to the country-specific policy that contains the version of the document you want to edit.

  4. On the Policy Details page of the country-specific policy you chose, you can see information about the policy and its existing versions. To edit a version, click View in the Action column of that version.

  5. On the Version Details page, use the text editor on the left side of the page to make your edits. The text box on the right side shows you how your changes will look after they're published.

  6. Once completed, click Save.

Publish a document version

After you create a legal document, you can publish the legal document for all players in the applicable namespace. To do so, follow the steps below.

  1. In the Admin Portal, go to Legal Management and click Legal Documents.

    AGS Starter

    Legal Management is called Legal Agreement in the Admin Portal for AGS Starter.

  2. On the Legal Documents page, you can see a list of all existing legal documents. Choose the document you want to publish and click View in the Action column next to it.

  3. On the Legal Document Details page, you can see detailed information about the selected legal document and the list of country-specific policies related to that document. Click View in the Action column next to the country-specific policy you want to publish.

  4. On the Policy Details page of the country-specific policy you chose, you can see information about the policy and its existing versions. To publish a version, click Publish in the Action column of that version.

  5. A confirmation window will appear. Type PUBLISH in all caps and select the checkbox if you want to notify players about the policy update via email.

  6. Click the Publish button. The new version will be published.

The Legal Agreement API can be called by using the functions in AccelByte::FRegistry::Agreement.

Check player eligibilities

Check the legal eligibility of all players from a specified namespace. Use this function to check whether the logged in player has already agreed to the legal agreement.

AccelByte::FRegistry::Agreement.QueryLegalEligibilites(
// Specified namespace
,
THandler < TArray < FAccelByteModelsRetrieveUserEligibilitiesResponse >> ::
CreateLambda(
[](TArray < FAccelByteModelsRetrieveUserElegibilitiesResponse > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieve policies

Retrieve all latest active policies based on the namespace from the game configuration and country code from the user's profile.

AccelByte::FRegistry::Agreement.GetLegalPolicies(
// Specified policy type
,
// Default on empty flag
,
THandler < TArray < FAccelByteModelsPublicPolicy >> ::
CreateLambda([](TArray < FAccelByteModelsPublicPolicy > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieve list of policies by namespace

Retrieve all latest active policies from a specified namespace and country code from the user's profile.

AccelByte::FRegistry::Agreement.GetLegalPolicies(
// Specified namespace
,
// Specified policy type
,
// default on empty flag
,
THandler < TArray < FAccelByteModelsPublicPolicy >> ::
CreateLambda([](TArray < FAccelByteModelsPublicPolicy > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieve List of policies by tag

Retrieve all latest active policies that have specified tags based on the namespace from game configuration and country code from the user's profile.

AccelByte::FRegistry::Agreement.GetLegalPolicies(
// Specified policy type
,
// List of tags
,
// default on empty flag
,
THandler < TArray < FAccelByteModelsPublicPolicy >> ::
CreateLambda([](TArray < FAccelByteModelsPublicPolicy > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieve list of policies by country

Retrieve all latest active policies based on a specified country and the namespace from game configuration.

AccelByte::FRegistry::Agreement.GetLegalPolicies(
// Specified country code
,
// Specified policy type
,
// Default on empty flag
,
THandler < TArray < FAccelByteModelsPublicPolicy >> ::
CreateLambda([](TArray < FAccelByteModelsPublicPolicy > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieve list of policies by country and tag

Retrieve all latest active policies that have specified tags based on a specified country and the namespace from game configuration.

AccelByte::FRegistry::Agreement.GetLegalPolicies(
// Specified country code
,
// Specified policy type
,
// List of tags
,
// Default on empty flag
,
THandler < TArray < FAccelByteModelsPublicPolicy >> ::
CreateLambda([](TArray < FAccelByteModelsPublicPolicy > Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Retrieving a document's content

Use this function to retrieve the content of the specified document.

AccelByte::FRegistry::Agreement.GetLegalDocument(
// Specified URL
,
THandler < FString > ::CreateLambda([](FString Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Accept policies

Accept a single policy

Use this function to accept a localized policy document by providing the localized policy version ID.

AccelByte::FRegistry::Agreement.AcceptPolicyVersion(
// Specified localized policy version ID
,
FVoidHandler::CreateLambda([]() {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

Accept policies in bulk

Use this function to accept many localized policy documents at once.

AccelByte::FRegistry::Agreement.BulkAcceptPolicyVersions(
// list of localized policy versions
,
THandler < FAccelByteModelsAcceptAgreementResponse > ::
CreateLambda([](FAccelByteModelsAcceptAgreementResponse Result) {
// Do something when successful
}),
FError::CreateLambda([](int32 ErrorCode, FString ErrorMessage) {
// Do something when failed
})
);

SDK initialization

Before using the Legal service from the SDK, you will need to initialize your server-side SDK to ensure you are authorized and able to perform create, read, update, and delete actions.

Golang SDK initialization

Before using the Legal service from the Golang SDK, you will need to initialize the SDK by following the steps below.

  1. Create your OAuth Client and assign the necessary permissions to access the IAM service.

  2. Log in as a Client using the SDK.

  3. Initialize the OAuth 2.0 service using the following function:

    agreementService := &legal.AgreementService{
    Client: factory.NewLegalClient(&repository.ConfigRepositoryImpl{}),
    TokenRepository: &repository.TokenRepositoryImpl{},
    }
  4. Once completed, you can use the Golang SDK to create, read, update, or delete the Legal service from your serverless app.

Click here for Golang test case files.

Python SDK initialization

Before using the Legal service from the Python SDK, you need to initialize the SDK by making sure that you've done the following requirements:

  1. Create your OAuth Client and assign the necessary permissions to access the Matchmaking service.
  2. Log in as a Client using the SDK.
  3. On a successful initialization, you can use the Python SDK to create, read, update, and delete the Legal service from your serverless app.
  4. To use the Legal Service, make sure you have the necessary permissions.

Click here for Python test case files.

.NET (C#) SDK initialization

Before using the Legal service, you will need to set some permissions. Use the following .NET namespaces:

    using AccelByte.Sdk.Api.Legal.Model;
using AccelByte.Sdk.Api.Legal.Operation;
using AccelByte.Sdk.Api.Legal.Wrapper;

Click here for .NET (C#) test case files.

Java SDK initialization

Before using the Legal service, you will need to set some permissions. Initialize the Agreement wrapper from the Legal service using the following code:

Agreement wLegalAgreement = new Agreement(sdk);

Once completed, you can use the SDK to create, read, update, or delete agreements.

Click here for Java test case files.

Bulk accept policy versions

Use the following function to bulk accept policy versions:

err := dataRetrievalService.SaveAdminEmailConfiguration(input)
if err != nil {
return err
}
return nil

Retrieve Agreements

Use the following function to retrieve agreements:

ok, err := agreementService.RetrieveAgreementsPublic()
if err != nil {
return err
}
return nil

Use the following function to update marketing preference consent:

err := agreementService.ChangePreferenceConsent()
if err != nil {
return err
}
return nil