### 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`

  Type: `const char*`

  The name for the launcher.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

`icon_v`

  Type: `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 method.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `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 returned data, and is responsible for freeing it.
The value is a NUL terminated UTF-8 string.