Develop
Develop
Select your platform

Get Age Category API

Updated: Oct 15, 2024
Note: You are viewing the Spatial-sdk version of this topic.
To view this topic for Unity development, see Get Age Category API (Unity).
To view this topic for Unreal development, see Get Age Category API (Unreal).
To view this topic for Native development, see Get Age Category API (Native).

Overview

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.

Get Age Category API

The Get Age Category API enables you to retrieve the age group of the current user from the user’s Meta profile.

Example in Android app

// Get the age category of the currently logged-in user.
import com.meta.horizon.platform.ovr.requests.UserAgeCategory;

UserAgeCategory.get()
This endpoint does not require any parameters.
The API call returns a JSON object with the age category value. The possible values are:
  1. CH - For child users between the ages of 10-12 (or applicable age in user’s region).
  2. TN - For teenage users between the ages of 13-17 (or applicable age in user’s region).
  3. AD - AD - For adult users, ages 18 and up (or applicable age in user’s region).
  4. UNKNOWN - When there is no user age information available.

API usage requirements

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.
Did you find this page helpful?
Thumbs up icon
Thumbs down icon