Returns an OAuth 2.0 access token to access the API.
If you have not already registered your application using the Barracuda Token Service to obtain a Client ID and Client Secret, see Registering your Application in the Barracuda Token Service.
After retrieving an access token, include it with all subsequent requests.
Endpoints
Region | Endpoint |
---|---|
United States (US) | POST https://login.bts.barracudanetworks.com/token |
United Kingdom (UK) | POST https://uk.login.bts.barracudanetworks.com/token |
Parameters
Name | Required | Description | Type |
---|---|---|---|
grant_type | Required | OAuth grant type. This must be client_credentials. | String |
scope | Required | The list of permissions to request.
To request more than one scope, format your request with a space between scope names, as shown here: --data-urlencode "scope=forensics:account:read forensics:account:write" | String |
client_id | Required | Your application's Client ID generated from the Barracuda Token Service. | String |
client_secret | Required | Your application's Client Secret generated from the Barracuda Token Service. | String |
Response
Response Item | Description | Type |
---|---|---|
access_token | The access token issued by the authorization server. | String |
expires_in | The duration of time the token is granted for. | String |
token_type | The type of token. | String |
scope | The permissions assigned to the application. | String |
Sample Request
curl -u {client_id}:{client_secret} -X POST "https://login.bts.barracudanetworks.com/token" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data-urlencode "grant_type=client_credentials" \
--data-urlencode "scope=ess:account:read"
Sample Response
{
"access_token": "eyJhbGc3kj_iOiJSUzI1_NiIsInR5cCI6IkpXVCIsImtpZCI6IjJYSFN1VHdBZUph_VmJEWEhYLVRoQnBlbWlLZnBiUUlqNHNFWGc0X1F0NHMifQ.eyJqdGkiOiJuYVZJTC1lY0w4X0ZrTWdRR2FlWDAiLCJpYXQiOjE1OTY1NTUzNzksImV4cCI6MTU5NjU1ODk3OSwic2NvcGUiOiJ",
"expires_in": 3600,
"token_type": "Bearer",
"scope": "ess:account:read"
}