Get Linked User Token
The GET /api/auth/linked/{linkedUserId} endpoint retrieves a Bearer authentication token for a user account linked to the given linkedUserId. This allows a caller to obtain scoped, authorized access on behalf of a linked user within the Netevia banking platform. The returned token can then be used to perform operations tied to that linked user's account.
Endpoint
GET /api/auth/linked/{linkedUserId}
Authentication
Bearer token required. Obtain via:
POST https://api.banking.netevia.dev/api/auth/v2
Include in header: Authorization: Bearer {token}
Token lifetime: 10 minutes. Refresh via POST /api/auth/refresh.
When to use
Use this endpoint when a partner system or main account holder needs to act on behalf of a linked user (such as a subprofile or authorized user) and requires a dedicated authentication token for that linked account. This is particularly useful in scenarios where a business customer's main profile needs to delegate access or perform operations scoped to a specific linked user. The retrieved token can be passed as the Bearer token in subsequent API calls on behalf of that linked user.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| linkedUserId | integer (int32) | Yes | The unique numeric identifier of the linked user for whom the token is being retrieved. |
Response
200 OK
| Field | Type | Description |
|---|---|---|
| token | string | The Bearer authentication token for the linked user. Nullable. |
| expiration | string (date-time) | The UTC date and time when the token expires. |
| userId | integer (int32) | The numeric identifier of the linked user associated with the returned token. |
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expiration": "2026-06-08T14:35:00Z",
"userId": 48291
}Error Codes
| Code | When it happens |
|---|---|
| 400 | The linkedUserId is missing, malformed, or not a valid integer. |
| 401 | Token missing, expired, or invalid. |
| 403 | The caller does not have permission to retrieve a token for the specified linked user. |
| 404 | No linked user found for the given linkedUserId. |
| 500 | Internal server error. |
Common Mistakes
- Passing a non-integer or zero value for
linkedUserId— the parameter must be a valid positive integer. - Using the retrieved linked user token as the primary auth token for the request itself — you still need your own valid Bearer token in the
Authorizationheader to call this endpoint. - Not refreshing the linked user token before it expires — the returned token has a limited lifetime indicated by the
expirationfield; plan to refresh or re-fetch as needed.
Related Endpoints
POST /api/auth/v2— Obtain the primary Bearer token using username, password, and partnerId.POST /api/auth/refresh— Refresh an existing Bearer token before it expires.
Example
curl -X GET https://api.banking.netevia.dev/api/auth/linked/48291 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"