---
name: "dpm_getspacetoken"
section: "3"
platform: "linux"
package: "libdpm-dev"
version: "1.10.0-2+b3"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/dpm_getspacetoken"
---

# dpm\_getspacetoken(3)

get space token

## NAME

dpm\_getspacetoken - get space token

## SYNOPSIS

**#include \<sys/types.h\>**\
 **#include "dpm\_api.h"**

**int dpm\_getspacetoken (const char \****u\_token***,** **int \****nbreplies***,** **char \*\*\****s\_tokens***)**

## DESCRIPTION

**dpm\_getspacetoken** gets the list of space tokens associated with this user description.

The input argument is:

- *u\_token*

  specifies the user provided description associated with a previous reservespace request. If the argument is NULL, all the space tokens accessible by the user will be listed.

The output arguments are:

- *nbreplies*

  will be set to the number of replies in the array of space tokens.

- *s\_tokens*

  will be set to the address of an array of space tokens allocated by the API. The client application is responsible for freeing the array when not needed anymore.

## RETURN VALUE

This routine returns 0 if the operation was successful or -1 if the operation failed. In the latter case, **serrno** is set appropriately.

## ERRORS

- **EFAULT**

  *nbreplies* or *s\_tokens* is a NULL pointer.

- **ENOMEM**

  Memory could not be allocated for storing the reply.

- **EINVAL**

  The length of the user space token description is greater than 255 or the user space token description is unknown.

- **SENOSHOST**

  Host unknown.

- **SEINTERNAL**

  Database error.

- **SECOMERR**

  Communication error.
