Retrieval of tokens linked to an attachment

Once an employee has validated your access request, you will be able to retrieve the token linked to his account by making a request on the endpoint /protected :

query {
    employmentToken(employmentId: 73, clientId: 156432124){
        accessToken
        employment{
            id
            email
            user {
                id
            }
        }
    }
}

Input parameters:

  • clientId: provided by the Mobilic team when registering your software in Mobilic.

  • employmentId: identifier retrieved in the id field of the syncEmploymentrequest

The accessToken field and the userId returned will allow you to make requests on behalf of the concerned user.

Last updated