{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml","api-docs-content/apis/public_openapi.yaml":"api-docs-content/apis/public_openapi.yaml"},"props":{"metadata":{"markdoc":{"tagList":["openapi-code-sample","openapi-response-sample","replay-openapi","json-schema"]},"type":"markdown"},"seo":{"title":"Get Subscription"},"dynamicMarkdocComponents":["openapi"],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"get-subscription","__idx":0},"children":["Get Subscription"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Retrieve your current game action events subscription."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API Call Sample:"]}]},{"$$mdtype":"Tag","name":"OpenApiCodeSample","attributes":{"descriptionFile":"api-docs-content/apis/public_openapi.yaml","operationId":"getSubscription","parameters":{},"environments":{},"codeSamplesResolved":[{"lang":"shell","title":"curl","source":"curl -i -X GET \\\n  -u '<username>:<password>' \\\n  https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events"},{"lang":"javascript","title":"JavaScript","source":"const resp = await fetch(\n  `https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events`,\n  {\n    method: 'GET',\n    headers: {\n      Authorization: 'Basic ' + btoa('<username>:<password>')\n    }\n  }\n);\n\nconst data = await resp.text();\nconsole.log(data);"},{"lang":"javascript","title":"Node.js","source":"import fetch from 'node-fetch';\n\nasync function run() {\n  const resp = await fetch(\n    `https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events`,\n    {\n      method: 'GET',\n      headers: {\n        Authorization: 'Basic ' + Buffer.from('<username>:<password>').toString('base64')\n      }\n    }\n  );\n\n  const data = await resp.text();\n  console.log(data);\n}\n\nrun();"},{"lang":"python","title":"Python","source":"import requests\n\nurl = \"https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events\"\n\nresponse = requests.get(url, auth=('<username>','<password>'))\n\ndata = response.json()\nprint(data)"},{"lang":"java","title":"Java","source":"import java.net.*;\nimport java.net.http.*;\nimport java.util.*;\n\npublic class App {\n  public static void main(String[] args) throws Exception {\n    var httpClient = HttpClient.newBuilder().build();\n\n    var host = \"https://asia.stage.rubyplay.io\";\n    var pathname = \"/api/v1/subscriptions/game-action-events\";\n    var request = HttpRequest.newBuilder()\n      .GET()\n      .uri(URI.create(host + pathname ))\n      .header(\"Authorization\", \"Basic \" + Base64.getEncoder().encodeToString((\"<username>:<password>\").getBytes()))\n      .build();\n\n    var response = httpClient.send(request, HttpResponse.BodyHandlers.ofString());\n\n    System.out.println(response.body());\n  }\n}"},{"lang":"csharp","title":"C#","source":"using System;\nusing System.Net.Http;\nusing System.Threading.Tasks;\nusing System.Text;\nusing System.Net.Http.Headers;\n\npublic class Program\n{\n  public static async Task Main()\n  {\n    System.Net.Http.HttpClient client = new();\n\n    string base64String = Convert.ToBase64String(Encoding.ASCII.GetBytes(\"<username>:<password>\"));\n    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(@\"Basic\", base64String);\n\n    using HttpResponseMessage request = await client.GetAsync(\"https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events\");\n    string response = await request.Content.ReadAsStringAsync();\n\n    Console.WriteLine(response);\n  }\n}"},{"lang":"php","title":"PHP","source":"/**\n * Requires libcurl\n */\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n  CURLOPT_HTTPHEADER => [\n    \"Authorization: Basic \" . base64_encode(\"<username>:<password>\")\n  ],\n  CURLOPT_URL => \"https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events\",\n  CURLOPT_RETURNTRANSFER => true,\n  CURLOPT_CUSTOMREQUEST => \"GET\",\n]);\n\n$response = curl_exec($curl);\n$error = curl_error($curl);\n\ncurl_close($curl);\n\nif ($error) {\n  echo \"cURL Error #:\" . $error;\n} else {\n  echo $response;\n}"},{"lang":"go","title":"Go","source":"package main\n\nimport (\n  \"fmt\"\n  \"net/http\"\n  \"io/ioutil\"\n)\n\nfunc main() {\n  reqUrl := \"https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events\"\n  req, err := http.NewRequest(\"GET\", reqUrl, nil)\n  if err != nil {\n    panic(err)\n  }\n  req.SetBasicAuth(\"<username>\", \"<password>\")\n  res, err := http.DefaultClient.Do(req)\n  if err != nil {\n    panic(err)\n  }\n  defer res.Body.Close()\n  body, err := ioutil.ReadAll(res.Body)\n  if err != nil {\n    panic(err)\n  }\n\n  fmt.Println(res)\n  fmt.Println(string(body))\n}"},{"lang":"ruby","title":"Ruby","source":"require 'uri'\nrequire 'net/http'\nrequire 'openssl'\n\nurl = URI('https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events')\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest.basic_auth('<username>', '<password>')\n\nresponse = http.request(request)\nputs response.read_body\n"},{"lang":"r","title":"R","source":"library(httr)\n\nurl = \"https://asia.stage.rubyplay.io/api/v1/subscriptions/game-action-events\"\n\ndata_req <- GET(\n  url,\n  authenticate(\"<username>\", \"<password>\")\n  verbose()\n)\n\ncontent(data_req)"}]},"children":[]},{"$$mdtype":"Tag","name":"OpenApiResponseSample","attributes":{"descriptionFile":"api-docs-content/apis/public_openapi.yaml","operationId":"getSubscription","responseSamplesResolved":[{"lang":"json","title":"200 application/json","source":"{\n  \"gameActionEvents\": [\n    {\n      \"name\": \"FEATURE\",\n      \"gameId\": \"rp_140\"\n    }\n  ],\n  \"callbackUrl\": \"https://callback-url.com/rubyplay\",\n  \"auth\": {\n    \"type\": \"BEARER\",\n    \"credentialsConfigured\": true\n  }\n}"},{"lang":"json","title":"401 application/json","source":"{\n  \"code\": \"NOT_AUTHORIZED\",\n  \"message\": \"Authentication failed\",\n  \"timestamp\": \"2026-01-25T14:30:00Z\",\n  \"path\": \"/api/v1/subscriptions/game-action-events\"\n}"},{"lang":"json","title":"403 application/json","source":"{\n  \"code\": \"INSUFFICIENT_SCOPE\",\n  \"message\": \"Insufficient scope to access this resource. Required: subscription:get\",\n  \"timestamp\": \"2026-01-25T14:30:00Z\",\n  \"path\": \"/api/v1/subscriptions/game-action-events\"\n}"},{"lang":"json","title":"500 application/json","source":"{\n  \"code\": \"UNKNOWN_ERROR\",\n  \"message\": \"Something went wrong\",\n  \"timestamp\": \"2026-01-25T14:30:00Z\",\n  \"path\": \"/api/v1/subscriptions/game-action-events\"\n}"},{"lang":"json","title":"504 application/json","source":"{\n  \"code\": \"TIMEOUT\",\n  \"message\": \"The server did not respond within the expected time\",\n  \"timestamp\": \"2026-01-25T14:30:00Z\",\n  \"path\": \"/api/v1/subscriptions/game-action-events\"\n}"}]},"children":[]},{"$$mdtype":"Tag","name":"ReplayOpenApi","attributes":{"descriptionFile":"api-docs-content/apis/public_openapi.yaml","operationId":"getSubscription","parameters":{},"options":{},"environments":{},"environment":"stage"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Response Schema:"]}]},{"$$mdtype":"Tag","name":"JsonSchema","attributes":{"schema":{"$ref":"../../../apis/public_openapi.yaml#/components/schemas/GameActionEventsSubscriptionDto"},"options":{},"schemaResolved":{"openapi":"3.1.0","components":{"schemas":{"__root":{"$ref":"#/components/schemas/GameActionEventsSubscriptionDto"},"GameActionEventDto":{"type":"object","properties":{"name":{"type":"string","description":"Game Action Event name","example":"FEATURE","minLength":1},"gameId":{"type":"string","description":"Game ID.","example":"rp_140","minLength":1}},"required":["gameId","name"]},"GameActionEventsAuthDto":{"type":"object","properties":{"type":{"type":"string","description":"Type of auth for the webhook URL.","enum":["BEARER","BASIC","NONE"],"example":"BEARER","minLength":1},"credentialsConfigured":{"type":"boolean","description":"Credentials for auth type BASIC or BEARER are configured.","example":true}},"required":["credentialsConfigured","type"]},"GameActionEventsSubscriptionDto":{"type":"object","properties":{"gameActionEvents":{"type":"array","items":{"$ref":"#/components/schemas/GameActionEventDto","description":"Game Action Events"},"minItems":1},"callbackUrl":{"type":"string","description":"When this parameter is specified, it overrides the webhook URL.\nOtherwise, the default URL, which is used for money transactions, will be used (with the same auth type and credentials).","example":"https://callback-url.com/rubyplay"},"auth":{"$ref":"#/components/schemas/GameActionEventsAuthDto","description":"Authentication for the webhook URL, which is specified in the callbackUrl parameter"}},"required":["gameActionEvents"]}}}},"schemaResolvedErrors":[]},"children":[]}]},"headings":[{"value":"Get Subscription","id":"get-subscription","depth":2}],"frontmatter":{"seo":{"title":"Get Subscription"}},"lastModified":"2026-08-11T09:32:41.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/content/integration/public-api/game-events/get-subscription","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}