---
title: "Get an access token for a specific service | Ottieni un token di accesso per un servizio specifico"
method: GET
path: "/auth/profile/token"
tags: ["Auth"]
---

# Get an access token for a specific service | Ottieni un token di accesso per un servizio specifico

`GET /auth/profile/token`

## Request

- Base URL: `https://app.didattica.polito.it/api`
- URL: `https://app.didattica.polito.it/api/auth/profile/token`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/polito/apis/polito-students-api/docs/auth/profile/token/get.ts> (a function with typed inputs; its response is checked against the schema)

Returns the access token as plain text, or rendered as a QR code (SVG) when requested with `Accept: image/svg+xml`. | Restituisce il token di accesso come testo, oppure come codice QR (SVG) se richiesto con `Accept: image/svg+xml`.

## Query parameters

- `type` 'card' | 'event', required
- `id` string

## Headers

- `accept` 'image/svg+xml' | 'text/plain', required

## Response `200`

QR rendered as an SVG image

## Other responses

- `400`: The server could not understand the request due to invalid syntax.
- `500`: Server error

## Changes

- **2026-06-17** `4ef98d007971`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/polito/apis/polito-students-api/changes/auth/profile/token/get.md)

---

[API](https://skmtc.dev/polito/apis/polito-students-api.md) - [All operations](https://skmtc.dev/polito/apis/polito-students-api/llms.txt) - [OpenAPI document](https://skmtc.dev/polito/apis/polito-students-api/revisions/9d87728aaa56?raw)
