### Method

# Secret Service create_item_dbus_path

#### Declaration [src]

    void
    secret_service_create_item_dbus_path (
      SecretService* self,
      const gchar* collection_path,
      GHashTable* properties,
      SecretValue* value,
      SecretItemCreateFlags flags,
      GCancellable* cancellable,
      GAsyncReadyCallback callback,
      gpointer user_data
    )

#### Description [src]

Create a new item in a secret service collection and return its D-Bus object path.

It is often easier to use `secret_password_store()` or `secret_item_create()` rather than using this function. Using this method requires that you setup a correct hash table of D-Bus `properties` for the new collection.

If the `flags` contains `SECRET_ITEM_CREATE_REPLACE`, then the secret service will search for an item matching the `attributes`, and update that item instead of creating a new one.

`properties` is a set of properties for the new collection. The keys in the hash table should be interface.property strings like `org.freedesktop.Secret.Item.Label`. The values in the hash table should be `GVariant` values of the properties.

This method will return immediately and complete asynchronously. The secret service may prompt the user. `secret_service_prompt()` will be used to handle any prompts that are required.

Stability: Unstable

This method is not directly available to language bindings.

#### Parameters

`collection_path`

  Type: `const gchar*`

  The D-Bus object path of the collection in which to create item.

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

`properties`

  Type: `GHashTable`

  Hash table of D-Bus properties for the new collection.

  The data is owned by the caller of the function.

`value`

  Type: `SecretValue`

  The secret value to store in the item.

  The data is owned by the caller of the function.

`flags`

  Type: `SecretItemCreateFlags`

  Flags for the creation of the new item.

`cancellable`

  Type: `GCancellable`

  Optional cancellation object.

  The argument can be `NULL`.
  The data is owned by the caller of the function.

`callback`

  Type: `GAsyncReadyCallback`

  Called when the operation completes.

  The argument can be `NULL`.

`user_data`

  Type: `gpointer`

  Data to be passed to the callback.

  The argument can be `NULL`.
  The data is owned by the caller of the function.