Created
January 22, 2021 12:10
-
-
Save TobiasBerg/d644dbfe75ce3960c09b71d68e6ec8c1 to your computer and use it in GitHub Desktop.
C# Authenticate Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SessionPayload payload = new SessionPayload(); | |
payload.game_key = "your game api key"; | |
payload.player_identifier = "1c066e0d-b746-489e-8fd3-5a4e93e92c3e"; | |
payload.platform = "steam"; | |
payload.game_version = "1.0.0"; | |
String requestBody = payload.ToJSON(); | |
var client = new RestClient("https://api.lootlocker.io/game/v2/session"); | |
var request = new RestRequest(Method.POST); | |
request.AddHeader("Content-Type", "application/json"); | |
request.AddParameter("application/json", requestBody, ParameterType.RequestBody); | |
IRestResponse response = client.Execute(request); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment