# Session Management

## Token Retrieval

If you need to manage your user's sessions, Ramper SDK exposes an idToken and a refreshToken. These tokens will be returned in a `ramperCredential` property if `issueIdToken` is set to `true` in the `init` function.

## Token Verification

The idToken is a JWT can be verified with your App Secret obtained through the developer console. (use "import \* as jwt from 'jsonwebtoken'")

![](/files/SuD4YelrQJWJe0p8YIl6)

Retrieving a new refreshToken if the existing refreshToken is still valid:

```
POST https://us-central1-ramper-prod.cloudfunctions.net/getRefreshedToken

Post Params (JSON):
{
  "refreshToken": "<USER_REFRESH_TOKEN>"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ramper.xyz/embedded-wallet-sdk/quickstart/for-web-apps/version-1/sdk-specifications/session-management.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
