Authentication
Bearer tokens created in the old woodyou.care dashboard.
v1 uses personal access tokens (Laravel Sanctum) that were created in the old woodyou.care dashboard under Account > API tokens. Send the token in the Authorization header of every request, and ask for JSON:
Authorization: Bearer {YOUR_TOKEN}
Accept: application/jsonWhat a token can do
- A token belongs to a user and sees the company that user belongs to. All reads are scoped to that company.
- Tokens were created with the permissions
read,create,updateanddelete. Since every remaining endpoint is a read, onlyreadstill matters. - A token without a company, or with a company that never became a customer, gets
403with the messageNo company is linked to this API user.onget-stats.
After the move to the Platform
Existing tokens were imported into the WoodYouCare Platform and keep working on v1 until the end date. You cannot create new v1 tokens: the old dashboard is gone. New tokens are Platform API tokens and only work on v2.
Language
v1 answers in Dutch, as the old shop did: country names in get-trees and get-projects, validation messages and pagination labels. Add ?locale=en for English. Other values fall back to Dutch.
Laravel SDK
The WoodYouCare Laravel SDK for v1 sets the token from its config:
return [
'bearer_token' => '{YOUR_TOKEN}',
];The SDK is deprecated together with v1. There is no v2 SDK yet (to be confirmed).