get
https://api.banking.netevia.dev/Files/avatarIcon
Get Avatar Icon
The GET /Files/avatarIcon endpoint retrieves the current user's avatar image. The response includes the image data encoded as a base64 string along with the MIME type, enabling clients to render the avatar correctly on web or mobile platforms.
Endpoint
GET /Files/avatarIcon
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 your application needs to display the user's profile avatar. It is suitable for both web and mobile clients since the image is returned as a base64 string paired with a content type, so no separate image URL or storage lookup is required.
Response
200 OK
| Field | Type | Description |
|---|---|---|
| Content | string | Base64-encoded binary content of the avatar image |
| ContentType | string | MIME type of the image (e.g., image/jpeg, image/png) |
{
"Content": "base64-encoded file content",
"ContentType": "image/jpeg"
}Error Codes
| Code | When it happens |
|---|---|
| 401 | Token missing, expired, or invalid |
| 403 | Insufficient permissions |
| 404 | No avatar image has been set for the authenticated user |
| 500 | Internal server error |
Common Mistakes
- Attempting to decode the
Contentfield before verifying theContentType— always use the returned MIME type to determine the correct image format before rendering. - Not handling the 404 response — if no avatar has been uploaded, the endpoint returns 404. Build a fallback (e.g., a default avatar) to handle this case gracefully.
- Using a stale or expired Bearer token — tokens expire after 10 minutes. Refresh via
POST /api/auth/refreshbefore making this call if the token is near expiry.
Related Endpoints
POST /Files/avatarIcon— Upload or update the authenticated user's avatar imageDELETE /Files/avatarIcon— Remove the authenticated user's avatar image
Example
curl -X GET https://api.banking.netevia.dev/Files/avatarIcon \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" 200return content of your image
