You can set up account linking between a user’s account in your system and their Meta account. This gives your system access to their alias, which is their Meta username, and their org-scoped ID, which is their identity across Meta Quest apps for your team.
Age-based feature limitations
When developing your apps, consider the following limitations related to age:
Child users under 13 (10-12 year olds): Regardless of your app’s self-certification status, child users under 13 cannot access this Platform SDK feature. Implement error-handling for this unsupported feature to maintain a safe and pleasant experience for child users.
Get started with account linking
This guide will cover how to set up account linking with in the developer dashboard, the user experience and the steps needed to retrieve an ID and alias. To use account linking you will need an app set up in the developer dashboard and user or test user accounts.
1. Register your login URL in the developer dashboard
To set up account linking for your app, you must first register an SSO URI in the developer dashboard.
Log in to the developer dashboard. From the left naviagation panel, navigate to Team > SSO.
Provide your login URI in the box provided and click Submit.
2. Create an account linking UI and forward user to Meta
From your app or website, you should provide the user with a button (or other UI) to opt in to their account in your system with their Meta account.
When the user clicks the button (or triggers the opt-in to their account through other UI), you should redirect them to Meta at the following URI, specifying your registered SSO URI and your Meta Quest team ID as query parameters:
When Meta Quest forwards users to your login URI, the URI contains base-64 encoded JSON appended to the URI. This JSON contains the authorization code and scoped user ID that you can use to retrieve an OAuth token.
The URI is structured in the following way:
Make sure to save the user ID in your system so that you can use it to request refresh tokens.
4. Send the code and user ID and authorization info to request tokens
Use the info from the previous step along with the app ID and app secret to request an OAuth token. Your app ID and app secret can be found in the developer dashboard under Development > API. You must use an admin account to access the app secret from the API page.
Send a message like the following:
URI: https://graph.oculus.com/sso_authorize_code
METHOD: POST
Example message:
POST https://graph.oculus.com/sso_authorize_code?code=somecode
&access_token=OC|client-id|client-secret&org_scoped_id=user-id-for-your-org
PARAMETERS:
Parameter
Param Type
Description
code
query
The access code obtained from the decoded result in step 3.
access_token
query
Token in the format OC|APPID|APPSECRET that contains the app ID and app secret found on the Meta Quest dashboard under Development > API > App Credentials.
org_scoped_id
query
The scoped identifier obtained from the decoded result in step 3.
Example success response:
The JSON response contains a 30-day OAuth token and refresh code.
POST https://graph.oculus.com/sso_authorize_refresh_code?
access_token=AppSecretToken&org_scoped_id=some-id&refresh_code=refresh-code
PARAMETERS:
Parameter
Param Type
Description
access_token
query
Token in the format OC|APPID|APPSECRET that contains the app ID and app secret found on the Meta Quest dashboard under Development > API > App Credentials.
org_scoped_id
query
The scoped identifier sent in the request to your login URL.
refresh_code
query
The refresh code from step 4.
Example success response:
The JSON response contains a 30-day OAuth token and another refresh code.