# Generate a widget access token

Generate a widget access token for our Hosted Widget.

Endpoint: POST /api/token/
Version: 1.223.0
Security: basicAuth

## Response 200 fields (application/json):

  - `access` (string)
    The access token to be used to authenticate the widget.
    Example: "jwt_test_ey.........."

  - `refresh` (string)
    The refresh token to be used to authenticate the widget.
    Example: "jwt_test_ey.........."

## Response 500 fields (application/json):

  - `code` (string)
    A unique error code (unexpected_error) that allows you to classify and handle the error programmatically.


ℹ️ Check our DevPortal for more information on how to handle 500 unexpected_error errors.
    Example: "unexpected_error"

  - `message` (string)
    A short description of the error. 


For unexpected_error errors, the description is:
  
  - Belvo is unable to process the request due to an internal system issue or to an unsupported response from an institution.
    Example: "Belvo is unable to process the request due to an internal system issue or to an unsupported response from an institution"

  - `request_id` (string)
    A 32-character unique ID of the request (matching a regex pattern of: [a-f0-9]{32}). Provide this ID when contacting the Belvo support team to accelerate investigations.
    Example: "9e7b283c6efa449c9c028a16b5c249fb"


