Get linked user token

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

ParameterTypeRequiredDescription
linkedUserIdinteger (int32)YesThe unique numeric identifier of the linked user for whom the token is being retrieved.

Response

200 OK

FieldTypeDescription
tokenstringThe Bearer authentication token for the linked user. Nullable.
expirationstring (date-time)The UTC date and time when the token expires.
userIdinteger (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

CodeWhen it happens
400The linkedUserId is missing, malformed, or not a valid integer.
401Token missing, expired, or invalid.
403The caller does not have permission to retrieve a token for the specified linked user.
404No linked user found for the given linkedUserId.
500Internal 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 Authorization header to call this endpoint.
  • Not refreshing the linked user token before it expires — the returned token has a limited lifetime indicated by the expiration field; 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"
Path Params
int32
required
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Response

Language
Credentials
Bearer
JWT
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/plain
application/json
text/json