### Method

# Xdp Session get_restore_token

#### Declaration [src]

    char*
    xdp_session_get_restore_token (
      XdpSession* session
    )

#### Description [src]

Retrieves the restore token of `session`.

A restore token will only be available if `XDP_PERSIST_MODE_TRANSIENT` or `XDP_PERSIST_MODE_PERSISTENT` was passed when creating the screencast session.

Remote desktop sessions cannot be restored.

May only be called after `session` is successfully started, i.e. after `xdp_session_start_finish()`.

#### Return value

Returns: | `char*`
| The restore token of `session`.
| The caller of the method takes ownership of the data, and is responsible for freeing it.
| The return value can be `NULL`.
| The value is a NUL terminated UTF-8 string.