ich experimentiere seit heute mit der AWORK API via Postman. Leider erhalten ich bei jedem Request (z.B. GET /users oder POST /projecttimebookings; URL: https://api.awork.com/api/v1) eine Response:
{
„message“: „Unauthorized“
}
Ich habe:
als Admin User einen API Client Token erstellt
den Token als Bearer in den Header eingefügt
Muss ich irgendwo weitere Berechtigungen setzen/die API aktivieren?
Dann hast du nicht den richtigen Token verwendet. Der Token muss mit ey beginnen. Kann es sein, dass du das Client Secret verwendet hast? Hier ist noch einmal die Step by Step Anleitung: Authentication - awork.com
Hallo Nils, danke für die fixe Antwort!
ich würde gerne Weg 1 nutzen, hab aber keine Idee, wie ich mit dem Client-Secret einen fixen Token machen kann. in der Doku steht:
Using the API Key
To authenticate with and receive resources from the API, add the API Key to the Authorization header in the following form: Authorization: Bearer {api_key}
aber welche API muss ich aufrufen, um mit dem api_key das Token zu bekommen?
Hi @Sebastian, thank you for your response. Unfortunatelly, i am not smart enough to find out how it works. So it would be great if you could help me. Obviously, linking 2 times to the same documenation does not really help me!
maybe a screenshot or the headline of the relevant part in the documentation would help?! If I navigate to Settings-> Integration in the UI, then I am only able to create an API-Client with a name/id/secret/redirct-uri. I can not find a button which states: „click here to create a static token“.
Thank you!
Thank you @Sebastian,
this brings me back to the beginning. If i use this API-Key (which starts with ‚qO‘) for the request (e.g. B. https://api.awork.com/api/v1/projects -H „Authorization: Bearer %api-key%“) then i also get a 401 (like SH1 did). Therefore, I assume that I have to use the api-key to generate such a token.