Authentication
Here you can find information about the authentication process for the Polyteia API.
Personal Access Keys
Personal access keys are used to authenticate requests to the Polyteia API. For more information about personal access keys and how to create them, please refer to the Personal Access Keys section of the Polyteia documentation.
How do they work?
When you create a personal access key, it basically impersonates your account. When you use it to authenticate a request, the request will be made as if it was made by your account. Your personal access key is like your account's password. It has the same permissions as your account. If you have access to a resource, your personal access key will also have access to that resource.
Authentication Process
Bearer Token Authentication
All API requests must be authenticated using a Bearer token in the Authorization header.
Parameters
Authorization
(required): The Bearer token in the formatBearer <your_access_token>
Content-Type
(required): Must be set toapplication/json
Make sure to save your personal access key token in a secure location. Once you leave the page, you will not be able to see it again. If you lose it, you will need to create a new one. If someone gets access to your personal access key token, they will be able to impersonate your account and make requests to the API. So, please be careful and save it in a secure location. If you ever think that your personal access key token is compromised, you can delete it and create a new one.
Example
curl -X POST 'https://app.polyteia.com/api' \
-header "Content-Type: application/json" \
-header "Authorization: Bearer <your_access_token>" \ // your personal access key token
--data '{
"command": "create_dataset",
"params": {
"name": "Customers List",
"solution_id": "sol_cv33u4n0i6q45p93i930",
"description": "Customers list 4",
"source": "https://example.com/dataset.csv",
"slug": "customers_list"
}
}'
Response
200 OK
: Request was successful401 Unauthorized
: Invalid or missing authentication token403 Forbidden
: Token is valid but doesn't have required permissions
Zuletzt aktualisiert
War das hilfreich?