Getting Started
Worksection API introduction
API is an application program interface for integrating one software with another.Worksection API allows you to access our service and request/send data for simultaneous interaction of the service with other programs.
Useful materials:
SDK library to simplify the work with our API.
OAuth 2.0 library for easy work with the Worksection OAuth 2.0.
Method collections in Postman.
Worksection API features
All the main features and functions, presented in the system itself, are available through our API, namely:
For participants and contacts:
create teams for members and folders for contacts
create contacts
invite new account members
get a list of teams, members and contacts
add and exclude project members
subscribe and unsubscribe task members
For tasks and comments:
create, edit, close and reopen tasks
get task data
get a list of:
all tasks
tasks of a specific project
tasks according to search parameters
post and get task comments
create, set and remove task statuses/labels
For projects:
create, edit, archive and activate projects
create folders
get project data
get a list of projects and folders
create, set and remove project statuses/tags
For entered costs and enabled timers:
create, update and delete time and financial costs
get particular cost rows and total costs for projects and individual tasks
get a list of enabled member timers
stop enabled member timers
For files:
the ability to attach files to comments and project/task descriptions during creation as well as to get uploaded and attached files
Note! To prevent the loss, accidental deletion or intentional destruction of crucial data, the ability to delete most of the data was excluded, namely:
projects/tasks/comments
account members/contacts
project/task statuses/labels
uploaded and attached files
Worksection API authorization
To get access to Worksection API you can use:
admin token *grants highest rights
user token (oauth2 access token) *grants limited rights (according to user role and app permissions)
Admin token
Use next basic URL:
https://youraccount.worksection.com/api/admin/v2/
Admin token is generated in MD5 format from all request parameters and account administrative API key (example below).
?action=get_tasks&id_project=26
Getting token (on PHP)
$query_params = 'action=get_tasks&id_project=26';
$api_key = '7776461cd931e7b1c8e9632ff8e979ce';
$hash = md5($query_params.$apikey);
Final request
https://youraccount.worksection.com/api/admin/v2/?action=get_tasks&id_project=26&
hash=ec3ab2c28f21b4a07424f8ed688d6644
User token
*oauth2 access token
Use next basic URL:
https://youraccount.worksection.com/api/oauth2
Access token can be obtained by a special request (see details). It's valid for 24 hours. Then you need to refresh it with refresh_token or get a new one.
?action=get_tasks&id_project=26
Final request *with authorization header
curl -X GET -H "Authorization: Bearer <token_value>"
https://youraccount.worksection.com/api/oauth2?action=get_tasks&id_project=26
*with access_token parameter
https://youraccount.worksection.com/api/oauth2?action=get_tasks&id_project=26&
access_token=<token_value>
Worksection administrative API key
Administrative API key is used for access to Worksection API through the admin token.
Account → API → Show API key
Note! Only the account owner has access to the administrative API key!
Worksection OAuth 2.0 access token
Access data can be obtained by making a POST request to the URL of the token with the authorization code:
https://worksection.com/oauth2/token
The POST request must contain the required parameters:
client_id
client_id, received when creating the application.
client_secret
client_secret, received when creating the application.
grant_type
Always specify the authorization_code.
code
The authorization code (see details).
redirect_uri
URI where the response will be redirected. The URI must meet the requirements of the OAuth2 standard and use the HTTPS protocol.
CURL example:
curl -X POST -d "client_id=<client_id>&client_secret=<client_secret>&
grant_type=authorization_code&code=<authorization_code>&redirect_uri=<redirect_uri>"
https://worksection.com/oauth2/token
Example response:
{
"token_type": "bearer",
"expires_in": 86400,
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJh...",
"refresh_token": "def502005534a202e9e8effa05cdbad564015604f34...",
"account_url": "https://authorizeduseraccount.worksection.com"
}
The received access_token and refresh_token will be used in subsequent requests to access the API and update the access_token. The access_token is valid for 24 hours, the refresh_token is valid for 1 month.
Last updated
Was this helpful?