Planfix API: Authentication by token

From PlanFix
(Redirected from Authentication by token)
Jump to: navigation, search

When authenticating using a token, each API call must contain a basic HTTP authentication header. Authentication tokens are created in the section Account Management / API Access, and they can be limited to only specific functions.

In the example in the screenshot, only one authentication token is created, which, when used, will result in requests being made on behalf of the user John Smith (meaning requests to get tasks will return only tasks available to this user)


If you want to use the API to modify all tasks, you can use a Robot

When authorizing using a token, use the API Key as the user and the authentication token as the password in the basic HTTP authentication header. When authorizing using a username and password, using the API Key as the user and leave the password empty. Example with token authentication:

curl -H 'Accept: application/xml' -H 'Content-Type: application/xml' \ -u 4db09df5a62a8a32a9522fcac02d3c6f:06540b851b466ccf84558573aff11b65 -k -d '<request>...</request>'

Information for when creating the header yourself. The basic authentication header looks as follows:

Authorization : Basic NGRiMDlkZjVhNjJhOGEzMmE5NTIyZmNhYzAyZDNjNmY6WA==

where after Basic comes: base64('ApiKey:Token');

Go To