Retrieve a single player record (Subscription) data registered to a specific OneSignal app.

This is a Legacy API. Use View User or CSV Export API instead.


Path Parameters

ParameterTypeRequiredDescription
player_idstringYesThe OneSignal ID of the device.

Query Parameters

ParameterTypeRequiredDescription
app_idstringYesYour OneSignal App ID.

Headers

HeaderValueRequiredDescription
AuthorizationBasic YOUR_LEGACY_REST_API_KEYYesYour OneSignal LegacyREST API Key.

Example Request

GET /api/v1/players/player_id_string?app_id=your_app_id HTTP/1.1
Host: onesignal.com
Authorization: Basic YOUR_LEGACY_REST_API_KEY

Example Response

  "id": "player_id_string",
  "identifier": "push_token_or_email",
  "session_count": 5,
  "language": "en",
  "timezone": -28800,
  "game_version": "1.0",
  "device_os": "14.4",
  "device_type": 1,
  "tags": {
    "level": "10",
    "user_type": "free"
  },
  "last_active": 1625253300,
  "created_at": 1625249800,
  "invalid_identifier": false,
  "external_user_id": "user123"
}

Response Fields

FieldTypeDescription
idstringOneSignal player ID.
identifierstringPush token, email, or phone number.
session_countintegerNumber of sessions associated with this device.
languagestringLanguage set on the device (e.g., “en”).
timezoneintegerTime zone offset in seconds.
game_versionstringVersion of your app the device is running.
device_osstringOperating system version.
device_typeintegerNumeric code for platform (0 = iOS, 1 = Android, etc.).
tagsobjectCustom tags set on the device.
last_activetimestampLast time the user was active (Unix timestamp).
created_attimestampWhen the device record was created.
invalid_identifierbooleanWhether the push token or identifier is invalid.
external_user_idstringYour internal user ID mapped to this device.

Errors

  • 400 Bad Request – Missing or invalid parameters.
  • 401 Unauthorized – Invalid or missing API key.
  • 403 Forbidden – Access denied for this app or resource.
  • 404 Not Found – The specified player_id does not exist.