Enabling Authentication

You can add an authentication method to your mint.json to enable it on every page or you can set it on a per-page basis.

The page’s authentication method will override mint.json if both are set.

Supported Authentication Methods

  • bearer
  • basic
  • none

The “none” authentication method is useful to disable authentication on a specific endpoint after setting a default in mint.json.

Authentication Name

By default, basic authentication asks for username and password. However, basic authentication can use a different name for username and password. For example, you could have called it user-id:user-key.

You can set the name property in mint.json to override the default functionality. Use colons to separate each property you want to request.

Custom username and password
"api": {
    "auth": {
        "method": "basic",
        "name": "user-id:user-key"
    }
}

You can also request a single API key by excluding the colon.

Custom username and password
"api": {
    "auth": {
        "method": "key",
        "name": "my-api-key"
    }
}