Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Logging in

This page will show you how to get logged in to the application.

Logging into the application as an API User involves a request to the /oauth/token endpoint.

1. Getting a token

curl -X POST -d 'password=[yourpassword]' \
  'https://api.brandwatch.com/oauth/token?username=[your@username.com]&grant_type=api-password&client_id=brandwatch-api-client'

If successful, you will receive a JSON response similar to the following:

{
  "access_token": "aa000000-0aaa-0000-0a00-aa00a000a00a",
  "token_type": "bearer",
  "expires_in": 31535999,
  "scope": "read trust write"
}

The access_token value can now be submitted with any other request to the Brandwatch API and it will grant you access to the API.

The expires_in field informs you how long (in seconds) the access token is valid for, the default for an API User is one year.

2. Using your token

Once you have an access token you now have access to all of the API. When making a request the token can be submitted in one of two ways:

  1. In the request Headers in the format Authorization: bearer [ACCESS TOKEN]
  2. In the URL as a parameter &access_token=[ACCESS TOKEN]

For the sake of brevity, we do not include the passing of the token in all of our documented calls. However, here is an example of what it would look like with cURL:

curl ­-X GET https://api.brandwatch.com/projects/summary.json -­H
"Authorization: bearer xxxx-xxxx-xxxx-xxxx”

Logging in

This page will show you how to get logged in to the application.