Skip to main content

Authentication

POST Enable/Disable OAuth

https://api.track.toggl.com/api/v9/me/enable_oauth/{provider}

Enable/Disable login using user's provider account to existing Toggl account.

curl -X POST https://api.track.toggl.com/api/v9/me/enable_oauth/{provider} \
-H "Content-Type: application/json" \
-d '{"code":"string","enabled":"boolean","token":"string"}' \
-u <email>:<password>

Parameters

Query

nametyperequireddescription
errorstringfalseError

Body

nametypedescription
codestringPointers are used to distinguish between missing fields and zero values
enabledboolean-
tokenstring-

Response

Successful operation.

POST ResetToken

https://api.track.toggl.com/api/v9/me/reset_token

Resets API token for the current user.

curl -X POST https://api.track.toggl.com/api/v9/me/reset_token \
-H "Content-Type: application/json" \
-u <email>:<password>

Response

Successful operation.

POST Create session

https://api.track.toggl.com/api/v9/me/sessions

Creates a session and sets a cookie in the response header which can be used for authentication in API requests

curl -X POST https://api.track.toggl.com/api/v9/me/sessions \
-H "Content-Type: application/json" \
-d '{"remember_me":"boolean"}'

Parameters

Body

nametypedescription
remember_meboolean-

Response

{
"api_token": {
"description": "will be omitted if empty",
"type": "string"
},
"email": {
"type": "string",
"format": "email"
},
"fullname": {
"type": "string"
},
"id": {
"type": "integer"
},
"timezone": {
"type": "string"
}
}

DELETE Delete session

https://api.track.toggl.com/api/v9/me/sessions

Deletes a session used for authenticating the current request

curl -X DELETE https://api.track.toggl.com/api/v9/me/sessions \
-H "Content-Type: application/json"

Response

POST Signup

https://api.track.toggl.com/api/v9/signup

Sign up as a new user.

curl -X POST https://api.track.toggl.com/api/v9/signup \
-H "Content-Type: application/json" \
-d '{"code":"string","country_id":"integer","created_with":"string","email":"string","full_name":"string","google_access_token":"string","invitation_code":"string","password":"string","provider":"string","timezone":"string","token":"string","tos_accepted":"boolean","workspace":{"initial_pricing_plan":"integer","name":"string"}}'

Parameters

Body

nametypedescription
codestringrequired if signing up via OAuth
country_idinteger-
created_withstring-
emailstring-
full_namestring-
google_access_tokenstringDeprecated
invitation_codestring-
passwordstring-
providerstringrequired if signing up via OAuth
timezonestring-
tokenstringrequired if signing up via OAuth
tos_acceptedboolean-
workspace
nametypedescription
initial_pricing_planinteger-
namestring-
-

Response

{
"api_token": {
"description": "will be omitted if empty",
"type": "string"
},
"at": {
"type": "string",
"format": "date-time"
},
"beginning_of_week": {
"type": "integer"
},
"country_id": {
"type": "integer"
},
"created_at": {
"type": "string",
"format": "date-time"
},
"default_workspace_id": {
"type": "integer"
},
"email": {
"type": "string",
"format": "email"
},
"fullname": {
"type": "string"
},
"id": {
"type": "integer"
},
"image_url": {
"type": "string",
"example": "http://example.com"
},
"intercom_hash": {
"description": "will be omitted if empty",
"type": "string"
},
"openid_email": {
"type": "string",
"format": "email"
},
"openid_enabled": {
"type": "boolean"
},
"options": {
"object": {
"additionalProperties": "object"
},
"description": "will be omitted if empty"
},
"timezone": {
"type": "string"
},
"updated_at": {
"type": "string",
"format": "date-time"
}
}
© 2022 Toggl. All rights reserved.