Hello World

This article will show you how to start the work with Buddy’s API: get the authentication token and execute API methods.

Authentication

Before you can use API, you need to authenticate. Authentication is based on oAuth mechanisms. In order to invoke an API method, you need an access token. Buddy allows you to generate a “Personal access token” which makes getting started easier. You can get it in your profile ID. When generating the token, you need to choose the list of scopes for data access.

Other ways to obtain the token are described in oAuth.

Retrieving API data for the first time

The easiest way to invoke an API method is cURL. Open the terminal and invoke it with the previously generated token:

bash
curl https://api.buddy.works/user?access_token=732e9e20-50ba-4047-8a7b-c9b17259a2a2 $

or send token as header

bash
curl --header "Authorization: Bearer 732e9e20-50ba-4047-8a7b-c9b17259a2a2" https://api.buddy.works/user $

This will receive the data about your profile in the JSON format:

Sample Response

HTTP

Status: 200 OK X-Rate-Limit-Limit: 1 X-Rate-Limit-Remaining: 999

JSON

json
{ "url": "https://api.buddy.works/user", "html_url": "https://app.buddy.works/my-id", "id": 1, "name": "Mike Benson", "avatar_url": "https://app.buddy.works/image-server/user/0/0/0/0/0/0/1/d643744fbe5ebf2906a4d075a5b97110/w/32/32/AVATAR.png", "workspaces_url": "https://api.buddy.works/workspaces" }

First update of data from API

To update your profile, you just need to send a PATCH with the variable to edit:

bash
curl -request PATCH --data '{"name": "Owner Lastname"}' https://api.buddy.works/user $

The following documentation describes all API methods of Buddy. In case of questions or requests or contact us directly [email protected]

Last modified on Apr 10, 2025

OSZAR »