Access the Session URL

Retrieve the LogRocket session URL for use in integrations

Integration with third party services can be accomplished by retrieving the Session URL and adding it as context to the third party library. In the React Native SDK, the session URL can be accessed with the LogRocket.getSessionURL method. Session URLs are only made available when our backend has accepted the session, which can take 1-5 seconds from when the SDK is initialized.

As of LogRocket version 1.32.0, once a getSessionURL callback is registered, it will be called each time a new session is started. A hardShutdown clears all registered callbacks.

LogRocket.getSessionURL(url => {
  // Use the accepted Session URL.
});