Get Age Category API
Updated: Jul 31, 2024
Note: You are viewing the Unreal version of this
topic.
Effective January 2024, for an app to be listed on the Meta Horizon Store, app owners are required to
self-certify the intended user age group for
their apps. Additionally, if an app is designed for mixed ages (under 13 and
13+), integration of the Get Age Category API is mandatory. By complying with these requirements, you will meet the necessary criteria for listing your app in the Store.
This document provides the necessary information and guidelines for implementing
the Get Age Category API into your app. This API requires a minimum SDK build version
of 56.0.
System and Hardware limitations The Get Age Category API is exclusive to apps built on the Android Platform.
The API is only supported on Meta Quest 2, Meta Quest 3, Meta Quest 3S, and Meta
Quest Pro.
The Get Age Category API enables you to retrieve the age group of the current
user from the user’s Meta profile.
// Get the age category of the currently logged-in user.
UserAgeCategory_Get()
Note: To use this with Unreal Engine 4, follow these steps:
- Upgrade to the latest Oculus fork of Unreal Engine 4.27.
- Navigate to Engine > Plugins > Runtime > Oculus in Unreal Engine to access the Oculus platform plugin.
- Enable the Meta XR platform by selecting Plugins from the Edit menu. This will provide access to the latest PSDK function library, including
UserAgeCategory_Get()
.
Unreal Engine 5 users can install the plugin following instructions on
this page.
This endpoint does not require any parameters.
The API call returns a JSON object with the age category value. The possible
values are:
- CH - For child users between the ages of 10-12 (or applicable age in user’s region).
- TN - For teenage users between the ages of 13-17 (or applicable age in user’s region).
- AD - AD - For adult users, ages 18 and up (or applicable age in user’s region).
- UNKNOWN - When there is no user age information available.
Usage of the Get Age Category API should be transparent to end users if possible. Please ensure
that the API is called at least once per user session when the user is connected
to the internet. However, users of the apps should not be blocked when the user
is offline or the API call fails. You can cache the user’s age group as a backup
option when there is no network connection.