> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Tokens

> Retrieve session tokens using the Stytch React Native SDK

Returns the `session_token` and `session_jwt` for the active session. Otherwise returns null.

## Response

<ResponseField name="session_token" type="string | null">
  The session token for the active session, or `null` if there is no active session or if the session is managed via HttpOnly cookies.
</ResponseField>

<ResponseField name="session_jwt" type="string | null">
  The session JWT for the active session, or `null` if there is no active session or if the session is managed via HttpOnly cookies.
</ResponseField>

<Panel>
  <RequestExample>
    ```jsx theme={null}
    import { useState } from 'react';
    import { View, Button, Text } from 'react-native';
    import { useStytchB2BClient } from '@stytch/react-native/b2b';
    import { SessionTokens } from '@stytch/react-native/b2b';

    export const GetSessionTokens = () => {
      const stytch = useStytchB2BClient();
      const [sessionTokens, setSessionTokens] = useState<SessionTokens | null>(null);

      // Callback to retrieve session tokens on demand
      const handleGetTokens = () => {
        const tokens = stytch.session.getTokens();
        setSessionTokens(tokens);
      };

      return (
        <View>
          <Button title="Get Session Tokens" onPress={handleGetTokens} />
          {sessionTokens && (
            <View>
              <Text>Session Token: {sessionTokens.session_token}</Text>
              <Text>Session JWT: {sessionTokens.session_jwt}</Text>
            </View>
          )}
        </View>
      );
    };
    ```
  </RequestExample>
</Panel>
