### Method

# Xdp Portal dynamic_launcher_request_install_token

#### Declaration [src]

    char*
    xdp_portal_dynamic_launcher_request_install_token (
      XdpPortal* portal,
      const char* name,
      GVariant* icon_v,
      GError** error
    )

#### Description [src]

Requests a token which can be passed to `xdp_portal_dynamic_launcher_install()` to complete installation of the launcher without user interaction.

This function only works when the caller’s app ID is in the allowlist for the portal backend being used. It’s intended for software centers such as GNOME Software or KDE Discover.

#### Parameters

`name` | `const char*`
| The name for the launcher.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`icon_v` | `GVariant`
| A `GBytesIcon` as returned by g_icon_serialize(). Must be a png or jpeg no larger than 512x512, or an svg.
| The data is owned by the caller of the function.
`error` | `GError **`
| The return location for a `GError*`, or `NULL`.

#### Return value

Returns: | `char*`
| A token that can be passed to `xdp_portal_dynamic_launcher_install()`, or `NULL` with `error` set.
| The caller of the method takes ownership of the data, and is responsible for freeing it.
| The value is a NUL terminated UTF-8 string.