Planfix API: Authentication by token: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
 
Line 29: Line 29:




== Go To ==
=== Go To ===
*[[XML API v1]]
*[[XML API v1]]

Latest revision as of 07:35, 1 July 2022

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)

rpUUJp.png

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>' https://api.planfix.ru/xml/

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