Get Session ID

🆔 REL-ID SDK API Documentation: getSessionID

📘 Overview

The getSessionID API retrieves the unique identifier associated with the current SDK session. This session ID helps track the lifecycle of an authenticated session and is used for auditing, logging, and scoping secure operations.

🎯 Purpose

Use this API to:

  • Identify and log the current SDK session.
  • Support debugging and correlation of session-scoped operations.
  • Secure data and operations that are only valid within a session.

🔁 API Flow

  1. Initialize the SDK and perform authentication.
  2. Call getSessionID() anytime after authentication.
  3. Use the session ID for tracking and session-based validation.

🧾 Response

Returns the session ID as a String.

🔧 Example Response:

SESSION_98765-XYZ

💻 Code Snippets

React Native
RdnaClient.getSessionID((response) => {
  const sessionId = response.response;
});
Flutter
final sessionId = await rdnaClient.getSessionID();
Cordova
com.uniken.rdnaplugin.RdnaClient.getSessionID(successCallback, errorCallback);
Native iOS
NSString* sessionId = [rdnaClient getSessionID];
Native Android
String sessionId = rdnaClient.getSessionID();

⚠️ Error Codes


🧠 Developer Notes

  • The session ID remains valid until logout or session expiration.
  • Recommended to include in all server-bound logs or API metadata.
  • Ensure the session is active before calling this API.