Learn how to authenticate in order to use Guru's API
Authentication for the API uses Basic Auth. To obtain your API credentials, follow the instructions in our Help Center article.
There are two types of tokens to use the Guru API: a Collection token (read-only), and a User token (read/write). For more information on what type of token will fit your use, read the API Tokens page.
Guru's API uses the REST protocol with JSON as the data format. The root of all API endpoints is https://api.getguru.com/api/v1/
.
If you'd like to test your authentication credentials with a User token, you can use the curl
command line tool as follows:
curl -u USER:TOKEN https://api.getguru.com/api/v1/teams -D -
If you'd like to test your authentication credentials with a Collection token, you can use the curl
command line tool as follows. You will need to obtain the Collection ID connected to the Collection token that you have for this call to work.
curl -u COLLECTION ID:TOKEN https://api.getguru.com/api/v1/teams -D -
If your credentials are correct, you will receive a response that lists information about your Guru team:
HTTP/1.1 200 OK
Content-Type: application/json
[ {
"status" : "ACTIVE",
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"dateCreated" : "2022-01-01T00:00:00.000+0000",
"name" : "My Guru Team"
} ]