All URIs are relative to https://api.timeular.com/api/v2/
Method | HTTP request | Description |
---|---|---|
developer_sign_in | POST /developer/sign-in | Sign-in with API Key & API Secret |
generate_api_key | POST /developer/api-access | Generate new API Key & API Secret |
get_api_key | GET /developer/api-access | Fetch API Key |
DeveloperSignInResponse developer_sign_in(api_key_and_api_secret=api_key_and_api_secret)
Sign-in with API Key & API Secret
With this endpoint you can obtain Access Token required to access secured endpoints. To do so, you have to provide API Key & API Secret. They can be generated on Profile website or, if you have Access Token already, with POST
request to /developer/api-access
. If you possess your Access Token you can now add this inside an HTTP header field Authorization
as value 'Bearer *your_access_token*'
to access restricted endpoints.
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# create an instance of the API class
api_instance = timeular_api.AuthenticationApi()
api_key_and_api_secret = timeular_api.DeveloperSignInRequest() # DeveloperSignInRequest | API Key and API Secret (optional)
try:
# Sign-in with API Key & API Secret
api_response = api_instance.developer_sign_in(api_key_and_api_secret=api_key_and_api_secret)
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->developer_sign_in: %s\n" % e)
Name | Type | Description | Notes |
---|---|---|---|
api_key_and_api_secret | DeveloperSignInRequest | API Key and API Secret | [optional] |
No authorization required
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeveloperFullApiAccessResponse generate_api_key()
Generate new API Key & API Secret
With this endpoint you can generate a new pair of API Key & API Secret. Every time you generate a new pair, an old one becomes invalid. Your API Secret won't be accessible later, so please note it down in some secret place. If you have lost your API Secret, you can generate a new pair of API Key & API Secret here.
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.AuthenticationApi(timeular_api.ApiClient(configuration))
try:
# Generate new API Key & API Secret
api_response = api_instance.generate_api_key()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->generate_api_key: %s\n" % e)
This endpoint does not need any parameter.
DeveloperFullApiAccessResponse
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeveloperApiAccessResponse get_api_key()
Fetch API Key
With this endpoint you can fetch your API Key (or null
if you haven't generated any yet). You cannot obtain an API Secret in such way, because it's visible only once, after generation. If you have lost your API Secret, please generate a new pair of API Key & API Secret.
from __future__ import print_function
import time
import timeular_api
from timeular_api.rest import ApiException
from pprint import pprint
# Configure API key authorization: AuthorizationHeader
configuration = timeular_api.Configuration()
configuration.api_key['Authorization'] = 'YOUR_API_KEY'
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['Authorization'] = 'Bearer'
# create an instance of the API class
api_instance = timeular_api.AuthenticationApi(timeular_api.ApiClient(configuration))
try:
# Fetch API Key
api_response = api_instance.get_api_key()
pprint(api_response)
except ApiException as e:
print("Exception when calling AuthenticationApi->get_api_key: %s\n" % e)
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json;charset=UTF-8
[Back to top] [Back to API list] [Back to Model list] [Back to README]