https://graph.oculus.com
OC|$APPID|$APPSECRET
.Note: Older versions of Unity using .NET 3.5 or earlier don’t support SSL certificates that use SHA2 and can’t be used for server-to-server requests.
Users.GetAccessToken()
method.FRL
or OC
and a long alpha numeric string similar to the following: FRL12342GhFccWvUBxPMR4KXzM5s2ZCMp0mlWGq0ZBrOMXyjh4EmuAPvaXiMCAMV9okNm9DXdUA2EWNplrQ
. https://graph.oculus.com/{app_id}/challenges
POST /1234757621998335/challenges/?api_name=leaderboard_api_name=hello_friends&creation_type=DEVELOPER_CREATED&visibility=PRIVATE&title=sample_challenge
Host: graph.oculus.com
Authorization: Bearer OC|1234f7a788b0c0b270f9691d0a06d5a5
curl -X POST https://graph.oculus.com/$APP_ID/challenges -d "access_token=OC|$APP_ID|$APP_SECRET" -d "leaderboard_api_name=sample_leaderboard" -d "creation_type=DEVELOPER_CREATED" -d "visibility=PRIVATE" -d "title=sample_challenge"
Parameter | Param type | Description | Type |
leaderboard_api_name | Query
| Required. The unique API name for the leaderboard associated with your challenge.
| string
|
creation_type | Query
| Required. Should always be “DEVELOPER_CREATED” using this method.
| Enum, value
DEVELOPER_CREATED |
visibility | Query
| Required. Either PUBLIC , INVITE_ONLY , or PRIVATE .
| Enum, value PUBLIC , INVITE_ONLY , or PRIVATE |
title | Query
| The title of the challenge.
| string
|
description | Query
| A description of the challenge.
| string
|
start_date | Query
| Start date of the challenge.
| date
|
end_date | Query
| End date of the challenge. Defaults to three days later.
| date
|
fields | Query | A comma separated list of fields to retrieve. Possible values -
| A comma-separated list of strings |
{
"id": "2643098232993236",
"title": "hello_challenge",
"start_date": "2020-07-14T22:58:24+0000",
"end_date": "2020-07-17T22:58:24+0000",
"leaderboard": {
"id": "3123283331082599"
}
}
https://graph.oculus.com/{challenge_id}
POST /1234757621998335?visibility=INVITE_ONLY
Host: graph.oculus.com
Authorization: Bearer OC|1234f7a788b0c0b270f9691d0a06d5a5
curl -X POST https://graph.oculus.com/$CHALLENGE_ID -d "access_token=OC|$APP_ID|$APP_SECRET" -d "visibility=INVITE_ONLY"
Parameter | Param type
| Description
| Type
|
visibility | Query
| Either PUBLIC , INVITE_ONLY , or PRIVATE .
| Enum, value “ PUBLIC ”, “INVITE_ONLY ”, or “PRIVATE" |
start_date | Query
| Date
| integer that represents a Unix timestamp
|
end_date | Query
| Date. This defaults to 3 hours after the start date.
| integer that represents a Unix timestamp
|
fields | Query
| A comma separated list of fields to retrieve. Possible values -
| A comma-separated list of strings
|
{
"success": true
}
https://graph.oculus.com/{challenge_id}
DELETE /12347576219983357
Authorization: Bearer OC|1234f7a788b0c0b270f9691d0a06d5a5
curl -X DELETE https://graph.oculus.com/$CHALLENGE_ID -d "access_token=OC|$APP_ID|$APP_SECRET"
{
"success": true
}
https://graph.oculus.com/{app_id}/challenges
GET /1234757621998335/challenges
Host: graph.oculus.com
Authorization: Bearer OC|1234757621998335|1234f7a788b0c0b270f9691d0a06d5a5
curl -G https://graph.oculus.com/$APP_ID/challenges -d "access_token=OC|$APP_ID|$APP_SECRET"
Parameter
| Param type
| Description
| Type
|
leaderboard_api_name | Query
| By default will get challenges for all leaderboards. Use leaderboard_api_name to return challenges for a single leaderboard.
| String
|
include_active_challenges | Query
| Default true. If false, does not return past challenges for your application.
| Boolean
|
include_past_challenges | Query
| Default false. If true, returns challenges with end dates in the past.
| Boolean
|
include_future_challenges | Query
| Default false If true, returns challenges with start dates in the future.
| Boolean
|
fields | Query
| A comma separated list of fields to retrieve. Possible values -
| A comma-separated list of strings
|
https://graph.oculus.com/{challenge_id}
GET
GET /1234757621998335?fields=id,title,description,start_date,end_date,leaderboard
Host: graph.oculus.com
Authorization: Bearer OC|1234757621998335|1234f7a788b0c0b270f9691d0a06d5a5
curl -G https://graph.oculus.com/$CHALLENGE_ID -d "access_token=OC|$APP_ID|$APP_SECRET" -d "fields=id,title,description,start_date,end_date,leaderboard"
Parameter
| Param type
| Description
| Type
|
fields | Query
| A comma separated list of fields to retrieve. Possible values -
| A comma-separated list of strings
|
{
"title": "sample_challenge",
"description": "Let's see who can climb the highest!",
"id" : "2643098232993236",
"leaderboard": {
"id": "7410520479067243"
}
}
GET
https://graph.oculus.com/{challenge_id}/entries
GET /1234757621998335/entries
Host: graph.oculus.com
Authorization: Bearer OC|1234757621998335|1234f7a788b0c0b270f9691d0a06d5a5
curl -G https://graph.oculus.com/$CHALLENGE_ID/entries -d "access_token=OC|$APP_ID|$APP_SECRET"
Parameter
| Param type
| Description
| Type
|
filter | Query
| This reduces the scope of score entries that are returned.
| Enum, value NONE (default), FRIENDS , or USER_IDS
|
start_at | Query
| Defines which order the entries are returned in.
| Enum, value TOP (default), VIEWER , VIEWER_OR_TOP , or OFFSET |
offset | Query
| Required when the start-at value is offset and indicates the offset value to use.
| Integer
|
limit | Query
| Reduce the amount of entries returned to this number.
| Integer
|
user_ids | Query
| Return entries for a given set of users.
| List of integers representing user ids.
|
fields | Query
| A comma separated list of fields to retrieve. Possible values -
| A comma separated list of strings
|