Skip to content

Personal Access Tokens

All operations require authentication.

5 operationsv1/me/identity
Agent setup

Retrieve all personal access tokens from this userProduction

GET
/1.0/me/identity/user/{user}/token

Path parameters

user
required
string

User

Response

200string[]successful operation

Example uses user = string

$ curl https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/token \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
[ "string"]

Create a new personal access tokenProduction

POST
/1.0/me/identity/user/{user}/token

Path parameters

user
required
string

User

Request body (required)

description
required
string

Personal access token's description

expiresAt
stringdate-time

Personal access token's expiration date

expiresIn
integer

Duration (in seconds) of the token's validity

name
required
string

Personal access token's name

Response

200PersonalAccessTokenResponsesuccessful operation
creation
read-only
stringdate-time

Creation date of this token

description
read-only
string

Personal access token's description

expiresAt
read-only
stringdate-time

Personal access token's expiration date

lastUsed
read-only
stringdate-time

Personal access token's last used date

name
read-only
string

Name of this token

token
read-only
stringpassword

Personal access token

Example uses user = string

$ curl https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/token \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creation": "2024-01-01T12:00:00Z", "description": "string", "expiresAt": "2024-01-01T12:00:00Z", "lastUsed": "2024-01-01T12:00:00Z", "name": "string", "token": "string"}

Get a personal access token's informationProduction

GET
/1.0/me/identity/user/{user}/token/{name}

Path parameters

name
required
string

Name

user
required
string

User

Response

200PersonalAccessTokensuccessful operation
creation
read-only
stringdate-time

Creation date of this token

description
read-only
string

Personal access token's description

expiresAt
read-only
stringdate-time

Personal access token's expiration date

lastUsed
read-only
stringdate-time

Personal access token's last used date

name
read-only
string

Name of this token

Example uses name = string, user = string

$ curl https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/token/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creation": "2024-01-01T12:00:00Z", "description": "string", "expiresAt": "2024-01-01T12:00:00Z", "lastUsed": "2024-01-01T12:00:00Z", "name": "string"}

Alter a user personal acces tokenProduction

PUT
/1.0/me/identity/user/{user}/token/{name}

Path parameters

name
required
string

Name

user
required
string

User

Request body (required)

description
string

Personal access token's description

expiresAt
stringdate-time

Personal access token's expiration date

expiresIn
integer

Duration (in seconds) of the token's validity

Response

200PersonalAccessTokensuccessful operation
creation
read-only
stringdate-time

Creation date of this token

description
read-only
string

Personal access token's description

expiresAt
read-only
stringdate-time

Personal access token's expiration date

lastUsed
read-only
stringdate-time

Personal access token's last used date

name
read-only
string

Name of this token

Example uses name = string, user = string

$ curl https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/token/{name} \
  -H "authorization: Bearer $OVH_TOKEN"
ResponseExample
{ "creation": "2024-01-01T12:00:00Z", "description": "string", "expiresAt": "2024-01-01T12:00:00Z", "lastUsed": "2024-01-01T12:00:00Z", "name": "string"}

Delete a personal access tokenProduction

DELETE
/1.0/me/identity/user/{user}/token/{name}

Path parameters

name
required
string

Name

user
required
string

User

Response

200—successful operation

Example uses name = string, user = string

$ curl https://api.eu.ovhcloud.com/1.0/me/identity/user/{user}/token/{name} \
  -H "authorization: Bearer $OVH_TOKEN"