Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: Ovh Auth API
version: '1.0'
contact:
name: OVH
email: api@ml.ovh.net
description: 'Operations tagged Auth across 2 of this provider''s published API definitions: ovh-v1-auth-openapi.json, ovh-v1-auth-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://eu.api.ovh.com/v1
tags:
- name: Auth
paths:
/auth/credential:
post:
operationId: createAuthCredential
summary: Request a new credential for your application
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/auth.ApiCredentialRequestParams'
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/auth.ApiCredentialRequest'
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\n# Request body type: auth.ApiCredentialRequestParams\nresult = client.post(\"/auth/credential\",\n\taccessRules = None, # Wanted API routes (type: array)\n\tallowedIPs = None, # If defined, list of IP blocks that can use the credential (type: array, nullable)\n\tredirection = None, # Address where the customer will be redirected after authentication (type: string, nullable)\n)\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n// Request body type: auth.ApiCredentialRequestParams\n$result = $ovh->post(\"/auth/credential\", array(\n\taccessRules => null, // Wanted API routes (type: array)\n\tallowedIPs => null, // If defined, list of IP blocks that can use the credential (type: array, nullable)\n\tredirection => null, // Address where the customer will be redirected after authentication (type: string, nullable)\n));\n\nprint_r($result);\n?>"
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
/auth/currentCredential:
get:
operationId: getAuthCurrentCredential
summary: Get the current credential details
security:
- oAuth2AuthCode: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/auth.ApiCredential'
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\nresult = client.get(\"/auth/currentCredential\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/auth/currentCredential\");\n\nprint_r($result);\n?>"
x-response-identifier: credentialId
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
/auth/details:
get:
operationId: getAuthDetails
summary: Details about the current authentication
security:
- oAuth2AuthCode: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/auth.Details'
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\nresult = client.get(\"/auth/details\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/auth/details\");\n\nprint_r($result);\n?>"
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
/auth/logout:
post:
operationId: logoutAuth
summary: Expire current credential
security:
- oAuth2AuthCode: []
responses:
'200':
description: successful operation
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\nresult = client.post(\"/auth/logout\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/auth/logout\");\n\nprint_r($result);\n?>"
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
/auth/time:
get:
operationId: getAuthTime
summary: Get the current time of the OVH servers, since UNIX epoch
responses:
'200':
description: successful operation
content:
application/json:
schema:
type: integer
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\nresult = client.get(\"/auth/time\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->get(\"/auth/time\");\n\nprint_r($result);\n?>"
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
/auth/token:
post:
operationId: createAuthToken
summary: Generate a one-time token to authenticate on OVHcloud's applications (only…
security:
- oAuth2AuthCode: []
responses:
'200':
description: successful operation
content:
application/json:
schema:
$ref: '#/components/schemas/auth.Token'
x-badges:
- color: green
label: Stable production version
x-code-samples:
- lang: python
label: Python
source: "'''\nFirst, install the latest release of Python wrapper: $ pip install ovh\n'''\nimport json\nimport ovh\n\n# Instantiate an OVH Client.\n# You can generate new credentials with full access to your account on\n# the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\nclient = ovh.Client(\n\tendpoint='ovh-eu', # Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n\tapplication_key='xxxxxxxxxx', # Application Key\n\tapplication_secret='xxxxxxxxxx', # Application Secret\n\tconsumer_key='xxxxxxxxxx', # Consumer Key\n)\n\nresult = client.post(\"/auth/token\")\n\n# Pretty print\nprint(json.dumps(result, indent=4))"
- lang: php
label: PHP
source: "<?php\n/**\n * First, download the latest release of PHP wrapper on github\n * And include this script into the folder with extracted files\n */\nrequire __DIR__ . '/vendor/autoload.php';\nuse \\Ovh\\Api;\n\n/**\n * Instantiate an OVH Client.\n * You can generate new credentials with full access to your account on\n * the token creation page (https://api.ovh.com/createToken/index.cgi?GET=/*&PUT=/*&POST=/*&DELETE=/*)\n */\n$ovh = new Api('xxxxxxxxxx', // Application Key\n 'xxxxxxxxxx', // Application Secret\n 'ovh-eu', // Endpoint of API OVH (List of available endpoints: https://github.com/ovh/python-ovh#2-configure-your-application)\n 'xxxxxxxxxx'); // Consumer Key\n\n$result = $ovh->post(\"/auth/token\");\n\nprint_r($result);\n?>"
tags:
- Auth
servers:
- url: https://eu.api.ovh.com/v1
components:
schemas:
ipBlock:
type: string
description: IP (v4 or v6) CIDR notation (e.g., 192.0.2.0/24)
format: ip-block
example: 192.0.2.0/24
auth.ApiCredential:
type: object
description: API Credential
properties:
allowedIPs:
type:
- array
- 'null'
description: If defined, list of ip blocks which are allowed to call API with this credential
items:
$ref: '#/components/schemas/ipBlock'
applicationId:
type: integer
description: ID of associated API Application
readOnly: true
creation:
type: string
description: Creation date of this credential
format: date-time
readOnly: true
credentialId:
type: integer
description: ID of this credential
readOnly: true
expiration:
type:
- string
- 'null'
description: Expiration date of this credential
format: date-time
readOnly: true
lastUse:
type:
- string
- 'null'
description: Last use date of this credential
format: date-time
readOnly: true
ovhSupport:
type: boolean
description: States whether this credential has been created by yourself or by the OVH support team
readOnly: true
rules:
type: array
description: API routes allowed to this credential
items:
$ref: '#/components/schemas/auth.AccessRule'
readOnly: true
status:
allOf:
- $ref: '#/components/schemas/auth.CredentialStateEnum'
description: State of to this credential
readOnly: true
auth.ApiCredentialRequest:
type: object
description: Credential request to get access to the API
properties:
consumerKey:
type: string
description: Consumer Key to use for further authenticated calls
format: password
readOnly: true
state:
allOf:
- $ref: '#/components/schemas/auth.CredentialStateEnum'
description: State of the credential
readOnly: true
validationUrl:
type: string
description: Address where to redirect the client to validate the access
readOnly: true
auth.HTTPMethodEnum:
type: string
description: All HTTP methods available
enum:
- DELETE
- GET
- PATCH
- POST
- PUT
auth.Details:
type: object
description: Details about the authentication used
properties:
account:
type: string
description: Customer identifier
readOnly: true
allowedRoutes:
type:
- array
- 'null'
description: Allowed API routes, null means everything
items:
$ref: '#/components/schemas/auth.AccessRule'
readOnly: true
description:
type:
- string
- 'null'
description: Description of the authenticated identity
readOnly: true
identities:
type: array
description: 'Identities of the current session: corresponds to all the authentication provider identities that could be used to match IAM policies'
items:
type: string
readOnly: true
method:
allOf:
- $ref: '#/components/schemas/auth.MethodEnum'
description: Authentication method
readOnly: true
roles:
type:
- array
- 'null'
description: Roles of the authenticated identity
items:
type: string
readOnly: true
user:
type:
- string
- 'null'
description: Username of the authenticated identity
readOnly: true
auth.AccessRuleRequest:
type: object
description: Access rule requested for the application
properties:
method:
allOf:
- $ref: '#/components/schemas/auth.HTTPMethodEnum'
description: Allowed Method
path:
type: string
description: Allowed path
auth.CredentialStateEnum:
type: string
description: All states a Credential can be in
enum:
- expired
- pendingValidation
- refused
- validated
auth.Token:
type: object
description: One-time token usable on OVHcloud's applications (only supported by chatbot for the moment)
properties:
token:
type: string
description: One-time token
format: password
readOnly: true
auth.MethodEnum:
type: string
description: All authentication methods available
enum:
- account
- oauth2_client_credentials
- provider
- user
auth.ApiCredentialRequestParams:
type: object
description: Credential request to get access to the API
properties:
accessRules:
type: array
description: Wanted API routes
items:
$ref: '#/components/schemas/auth.AccessRuleRequest'
allowedIPs:
type:
- array
- 'null'
description: If defined, list of IP blocks that can use the credential
items:
$ref: '#/components/schemas/ipBlock'
redirection:
type:
- string
- 'null'
description: Address where the customer will be redirected after authentication
required:
- accessRules
auth.AccessRule:
type: object
description: Access rule allowed to an application
properties:
method:
allOf:
- $ref: '#/components/schemas/auth.HTTPMethodEnum'
description: Allowed Method
readOnly: true
path:
type: string
description: Allowed path
readOnly: true
securitySchemes:
oAuth2AuthCode:
type: oauth2
description: Oauth2
x-client-id: 1bb9c7df371741c0
x-client-secret: a5b4de870aca620d10fbf63cd18d205b
flows:
authorizationCode:
authorizationUrl: https://auth.eu.ovhcloud.com/oauth2/authorize
tokenUrl: https://auth.eu.ovhcloud.com/oauth2/token
scopes:
account/all: Manage your account
all: Manage your whole account and all your services
services/all: Manage your services lifecycle and billing
x-refined-from:
- ovh-v1-auth-openapi.json
- ovh-v1-auth-openapi.yml