# Récupération des jetons liés à un rattachement

Une fois qu'un salarié a validé votre demande d'ouverture d'accès, vous pourrez récupérer le token liés à son compte en faisant une requête sur le endpoint [/protected](/guides/authentification/jetons-lies-a-un-rattachement.md#endpoint-protected) :

<pre class="language-graphql"><code class="lang-graphql"><strong>query {
</strong>    employmentToken(employmentId: 73, clientId: 156432124){
        accessToken
        employment{
            id
            email
            user {
                id
            }
        }
    }
}
</code></pre>

***Paramètres d'entrée :***

* *clientId* : fourni par l'équipe Mobilic lors de l'inscription de votre logiciel dans Mobilic.
* *employmentId* : identifiant récupérer dans le champ id de la requête `syncEmployment`

Le champ accessToken et le userId renvoyés vous permettront de faire des requêtes au nom de l'utilisateur concerné.


---

# Agent Instructions: 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:

```
GET https://developers.mobilic.beta.gouv.fr/guides/authentification/jetons-lies-a-un-rattachement/recuperation-des-jetons-lies-a-un-rattachement.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
