Take a sneak peak of our new documentation Read More
Last Updated: 4/3/2023, 1:06:06 AM

# Legal Agreements

AccelByte Cloud’s Legal Agreements service has the power to manage legal documents, such as Terms of Service, Privacy Policy, End User License Agreement (EULA). It can even manage 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, then store them in the Admin Portal.

Legal Agreements can be uploaded to either a game namespace or to 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.

# Permissions

Permissions are used to grant access to specific resources within our services. Make sure your account has the following permissions before you attempt to manage legal agreements in the Admin Portal. For a full list of permissions that impact legal agreement management, see the Legal tab of the permissions reference (opens new window).

Usage Permission Tag Action
Create a Legal Document ADMIN:NAMESPACE:*:LEGAL Create
Update a Legal Document ADMIN:NAMESPACE:*:LEGAL Update
Create a Country-Specific Policy ADMIN:NAMESPACE:*:LEGAL Update
Create a New Version of a Document ADMIN:NAMESPACE:*:LEGAL Create
Edit Document Version Details ADMIN:NAMESPACE:*:LEGAL Update
Publish a Document Version ADMIN:NAMESPACE:*:LEGAL Update
Retrieving Policies by Country ADMIN:NAMESPACE:*:LEGAL Read
Retrieving a Document Content ADMIN:NAMESPACE:*:LEGAL Read

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

To use the AccelByte Cloud's Legal Agreements service, first you must create a legal document in the 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 Platform Configurations and click Legal Documents.

    legal

On the Legal Documents page you can see a list of all existing Legal Documents.

  1. To create a new document, click Create Document.

    legal

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

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

    • Choose the type of document you’re creating from the Document Type dropdown menu. Choose Legal Document for legal documents such as Privacy Policies or Terms and Conditions. Choose Marketing Preference for marketing preferences such as the option for players to sign up for a newsletter.

    • Select the namespace where the document will be created from the Namespace dropdown menu. To apply the document to a single game select that game’s namespace, or to apply a document to all of your games select the publisher namespace.

    • Use the Country dropdown menu to select the countries to create country-specific policies for. The first country that you input will be the default country, and 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.

    • Input a tag for the document in the Tag field. This field is optional. Tags can be used to further classify documents.

    • To assign this legal document to a specific IAM client, select the client from the Client dropdown menu. In the publisher namespace, this could be Player Portal or Launcher, whereas in the game namespace this could be game client. If left blank, the legal document will not appear on any client. You can select multiple clients.

      Note

      If the legal document is created on a publisher namespace, there is no rule which game client can be affected.

      If the legal document is created for a game namespace, you can only add game clients in the respective game namespace.

    • Input a description of the document in the Description field.

    legal

  3. When you’re finished, click the Create button. The new document is added to the list.

# Create a Country-Specific Policy

After creating a legal document, you can create a country-specific policy to hold versions of that document that are for a specific country. 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 Platform Configurations and click Legal Documents.

    legal

    On the Legal Documents page you can see a list of all existing Legal Documents.

  2. Choose the document to which you want to add a new country-specific policy and click View next to that document.

    legal

    On the Legal Document Details page, you can see the details of the selected Legal Document and the list of country-specific versions of that document.

  3. To create a new country-specific policy, click Add Policy.

    legal

  4. The Add Policy form will appear. Choose a country from the dropdown menu and click Create to confirm.

    legal

    The country-specific policy will be added to the list and you’ll be redirected to the country-specific policy page that you just created.

    legal

  5. To set this country as the default country for country-specific policies, click the Set as Default button.

    legal

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

    legal

# Create a Platform Client-Specific Policy

You can also create a platform client-specific policy to hold versions of a document for a specific platform (e.g., Xbox, PlayStation, etc.). To add a new platform client-specific policy to a legal document, follow the steps below:

NOTE

Make sure you have already defined the IAM Client (opens new window) for your target platform before proceeding.

  1. In the Admin Portal, go to Platform Configurations and select Legal Documents.

legal

  1. On the Legal Documents page you can see a list of all your existing Legal Documents. Choose the document to which you want to add a new platform client-specific policy and click View in that document’s Action column.

legal

  1. On the Legal Document Details page you can see the details of your selected legal document and the clients associated with that document. To add a client, click Add more….

legal

  1. The Add New Client form will appear. Choose a client from the dropdown menu and click Add to confirm.

legal

  1. The platform client specific policy is successfully created.

legal

  1. To add this same legal document into multiple platform clients, you click Add more… and add another client from the dropdown menu.

If you want to create different legal documents for different platform clients, then you will need to create separate legal documents for each client.

# Create a New Version of a Document

After creating a country-specific policy, you can add a new version of that document any time it has been revised. To create a new version of a document, follow the steps below:

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

legal

On the Legal Documents page you can see a list of all existing Legal Documents.

  1. Choose the document to which you want to add a new version and click View next to that document.

legal

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.

  1. To create a new version of a country-specific policy, click View in the Action column of the country-specific policy you want to add a version to.

legal

On the Country-Specific Policy page, you can see information about the policy and its existing versions.

  1. To create a new version of the document, click Create Version.

legal

  1. Enter a name for the new version in the Version Name field.

legal

  1. Once you have completed the fields, click the Create button. The new document version is created.

legal

  1. To add content to your new document version, click View in the Action column of that version.

legal

On the Version Details page, you can see detailed information about the selected document version.

  1. To add content to this version, click Create New.

legal

  1. Select the language the document is in from the Locale dropdown menu. Then click Browse to find the document on your computer. The file should be in .md format.

legal

  1. When you have finished, click the Create button. The selected file will be uploaded.

legal

# 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 Platform Configurations and click Legal Documents.

legal

On the Legal Documents page you can see a list of all existing Legal Documents.

  1. Choose the document you want to edit and click View next to that document.

legal

On the Legal Document Details page, you can see detailed information about the selected Legal Document and the list of country-specific versions of that document.

  1. To open one of these country-specific policies, click View next to it.

legal

On the Country-specific Policy page, you can see detailed information about the policy and existing versions of it.

  1. To edit a version, click View next to the version you want to edit.

legal

  1. 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.

legal

  1. When you have finished, click Save.

legal

# Publish a Document Version

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

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

legal

On the Legal Document Details page, you can see detailed information about the selected Legal Document and the list of country-specific versions of it.

  1. Choose the document that you want to publish and click View in that document’s Action column.

legal

On the Legal Document Details page, you can see detailed information about the selected Legal Document and the list of country-specific versions of that document.

  1. Click View next to the country-specific policy you want to publish.

legal

On the Country-specific Policy page, you can see detailed information about the policy and existing versions of it.

  1. To publish a version, click Publish next to that version.

legal

A confirmation window appears.

  1. Type PUBLISH in all caps and select the checkbox if you want to notify players about the policy update via email.

legal

  1. When you’re finished, click Publish. 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 all players’ legal eligibility from a specified namespace. Use this function to check whether the player who is logged has already agreed to the legal agreement. You can check the IsAccepted variable from the retrieving model to see if the current legal document is already accepted by the player or not. If not, you can continue through the logic of your game whether showing that legal document to the player or not.

# Retrieve Policies

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

# Retrieve List of Policies by Namespace

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

# 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.

# Retrieve List of Policies by Country

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

# 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.

# Retrieve a Document’s Content

Use this function to retrieve the content of the specified document. You can get the required url by retrieving policies using the method in the previous section (opens new window).

# Accept Policies

# Accept a Policy

Use this function to accept a localized policy document by providing the localized policy version ID. You can get a localized policy version id by following the previous tutorial while retrieving policies.

# Accept Policies in Bulk

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

# 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:

Once completed, you can use the Golang SDK to create, read, update, or delete the Legal (opens new window) service from your serverless app.

Golang test case files (opens new window)

# 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.

On a successful initialization, you can use the Python SDK to create, read, update and delete Legal (opens new window) from your serverless app.

To use the Legal Service, make sure you have the necessary permissions.

Python test case files (opens new window)

# .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;

.NET (C#) test case files (opens new window)

# 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.

Java test case files (opens new window)

# Bulk Accept Policy Versions

Use the following function to bulk accept policy versions (opens new window):

# Retrieve Agreements

Use the following function to retrieve agreements (opens new window):

Use the following function to update marketing preference consent (opens new window):