Skip to main content
Version: 5.7.0

GetSessionForValidatedCredential

Creates and returns a session for the credentials provided.

This method is used for when you need a session for a user other than the one calling the script, or validate a crendential, or when a script does not have a user context by default (ex. S2S or Scheduled).

Method Parameters

ParameterDescription
externalIdUser ID for the given authenticationType
authenticationTypeType of authentication. Full list of types can be found here.
externalAuthTypeOptional parameter to specify the external authenticationType to use for the passed in credentials
authenticationTokenPassword or client side token

Usage

http://localhost:3000
// Cloud Code only. To view example, switch to the Cloud Code tab
JSON Response
{
"data": {
"json": {
"response": {
"session": {
"cacheObjects": {},
"systemCreated": true,
"packetSequenceInvalid": false,
"languageCode": null,
"sharedPlayers": {
"24667": "82cbbbf2-ee44-4279-b5a0-3e9bf04edf25"
},
"apiVersion": "VERSION_1_5",
"playerId": "82cbbbf2-ee44-4279-b5a0-3e9bf04edf25",
"gameId": "24667",
"cacheExpiry": 1200,
"lastPacketReceived": -1,
"clientLib": null,
"clientLibVersion": null,
"gameVersion": null,
"countryCode": null,
"loggedOut": false,
"gameIdSave": "24667",
"secret": null,
"platform": null,
"readTimestamp": null,
"invalidated": false,
"lastUploadHTTPCode": 0,
"lastUploadResponse": null,
"peerGameId": null,
"peerClientGameId": null,
"peerSponsored": null,
"gameIdOverridden": false,
"parentLevel": null,
"eventUpdateTimestamp": null,
"rttServerId": null,
"sharedDataSyncedIds": {},
"dynamicChatChannels": null,
"lastPacketProcessed": -1,
"lastPacketResponse": null,
"sessionId": "scriptSession_7bca7ed1-6b83-4402-98e8-793d046d1a6a",
"key": {
"sessionId": "scriptSession_7bca7ed1-6b83-4402-98e8-793d046d1a6a",
"primaryKey": true
}
}
},
"success": true
},
"statusCode": 200
},
"status": 200
}