API
Authentication
Tickaroo will Provide you with an client_id
and client_secret
that allows you to access resources within your organization directly.
Authentication to the API is either performed via HTTP Basic Auth or via query parameters.
For basic auth, use the client_id
as the basic auth username and the client_secret
as the basic auth password and encode them as usual.
For query parameters just add the client_id
and client_secret
to your query and set them to the corresponding values.
JWT login
Log in a user via jwt.
The fields need to be set in the JWT Payload:
{
"sub": "TheUserId",
"name": "username",
"email": "user@company.com"
}
Return value: Tik::ApiModel::RegisteredUser
Request: POST /api/v5/session/jwt.json
Query Parameters: (none)
Post Document:
{
// the users organization_id
"organization_id": "OrganizationId",
"jwt": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJUaGVVc2VySWQiLCJuYW1lIjoiVXNlciBOYW1lIiwiZW1haWwiOiJ1c2VyQGNvbXBhbnkuY29tIn0.rJ7MFLxEMq9OpJLLDr28aLRUIQtJmKNfhX-ygwUuDmA"
}
Success Response: Tik::ApiModel::RegisteredUser
Object
{
"_type": "Tik::ApiModel::RegisteredUser",
"_id": "aaaaaaaaaaaaaaaa",
"username": "User Name",
"email": "user@company.com",
"ext_id": "OrganizationId.TheUserId",
"image": {
"_type": "Tik::ApiModel::Image",
"image_url": "tik-iconpack://icon_profile_user_gray.svg"
},
"status": "external",
"auth": {
"_type": "Tik::ApiModel::UserAuthInfo",
"access_token": "xxxxxxxxxxxxxxxxxxxx",
"token_type": "Bearer",
"expires_in": 2672946,
"refresh_token": "yyyyyyyyyyyyyyyyyy"
},
"has_ticker": true,
"is_admin": false,
"is_pro_user": true
}