Get image

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

FieldTypeDescription
ContentstringBase64-encoded binary content of the avatar image
ContentTypestringMIME type of the image (e.g., image/jpeg, image/png)
{
  "Content": "base64-encoded file content",
  "ContentType": "image/jpeg"
}

Error Codes

CodeWhen it happens
401Token missing, expired, or invalid
403Insufficient permissions
404No avatar image has been set for the authenticated user
500Internal server error

Common Mistakes

  • Attempting to decode the Content field before verifying the ContentType — 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/refresh before making this call if the token is near expiry.

Related Endpoints

  • POST /Files/avatarIcon — Upload or update the authenticated user's avatar image
  • DELETE /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"
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses
200

return content of your image

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