> For the complete documentation index, see [llms.txt](https://www.center.daxium-air.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.center.daxium-air.com/api-reference/doc-api/autorisation.md).

# Autorisation

## Obtenir ou rafraîchir les jetons

> Utilisez \`grant\_type: password\` pour obtenir des jetons pour la première fois, ou\
> \`grant\_type: refresh\_token\` pour les renouveler sans ressaisir les identifiants.\
> Chaque rafraîchissement réinitialise l'expiration du jeton d'accès et génère un nouveau jeton de rafraîchissement.<br>

```json
{"openapi":"3.0.3","info":{"title":"Daxium Air API","version":"v1.3"},"tags":[{"name":"auth"}],"servers":[{"url":"https://api.daxium-air.com","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"PasswordGrantRequest":{"type":"object","required":["client_id","client_secret","grant_type","username","password"],"properties":{"client_id":{"type":"string","description":"Identifiant d'application OAuth2"},"client_secret":{"type":"string","description":"Clé secrète OAuth2"},"grant_type":{"type":"string","enum":["password"]},"username":{"type":"string","format":"email","description":"Adresse e-mail de l'utilisateur"},"password":{"type":"string","format":"password","description":"Mot de passe de l'utilisateur"}}},"RefreshTokenGrantRequest":{"type":"object","required":["client_id","client_secret","grant_type","refresh_token"],"properties":{"client_id":{"type":"string","description":"Identifiant d'application OAuth2"},"client_secret":{"type":"string","description":"Clé secrète OAuth2"},"grant_type":{"type":"string","enum":["refresh_token"]},"refresh_token":{"type":"string","description":"Jeton de rafraîchissement"}}},"TokenResponse":{"type":"object","properties":{"access_token":{"type":"string","description":"À utiliser dans l'en-tête `Authorization: Bearer`"},"refresh_token":{"type":"string","description":"À conserver pour le rafraîchissement des jetons"},"expires_in":{"type":"integer","description":"Durée de validité du jeton d'accès en secondes (3600)"},"token_type":{"type":"string"},"scope":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"string","description":"Code d'erreur unique préfixé par `DAERR-`"},"message":{"type":"string","description":"Description lisible de l'erreur"},"url":{"type":"string","format":"uri","description":"Lien vers la documentation détaillée de l'erreur"},"api_version":{"type":"string"},"infos":{"type":"array","items":{},"description":"Informations contextuelles supplémentaires (peut être vide)"},"server_time":{"type":"string","description":"Timestamp Unix sous forme de chaîne"}}}},"responses":{"Unauthorized":{"description":"Jeton invalide ou expiré","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"paths":{"/oauth/v2/token":{"post":{"summary":"Obtenir ou rafraîchir les jetons","description":"Utilisez `grant_type: password` pour obtenir des jetons pour la première fois, ou\n`grant_type: refresh_token` pour les renouveler sans ressaisir les identifiants.\nChaque rafraîchissement réinitialise l'expiration du jeton d'accès et génère un nouveau jeton de rafraîchissement.\n","tags":["auth"],"operationId":"getOrRefreshToken","requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PasswordGrantRequest"},{"$ref":"#/components/schemas/RefreshTokenGrantRequest"}]}}}},"responses":{"200":{"description":"Paire de jetons générée avec succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://www.center.daxium-air.com/api-reference/doc-api/autorisation.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
