Auth
API for creation or storage of auth tokens. Most of these
tokens are created from the Integrations/Imports setup for Lytics integrations.
Additionally, api tokens can be created/managed from this endpoint.
The oauth, config information are write only attributes that
cannot be subsequently read from the api, and is stored encrypted.
Retrieve a Single Auth
https://api.lytics.io/api/auth/{id}This API is fairly special, as only the public portions of the auth model are
returned, not all fields **config**, **oauth2token**, and **oathtoken** fields are
never exposed.
URL Parameters
idrequiredstringQuery Parameters
account_idoptionalstringaccess_tokenoptionalstringHeaders
Authorizationoptionalstring{
"status": "success",
"data": {
"account_id": "4f7b525bdba058fc096757a6",
"id": "1b53b88a06b418b07d601b6f57b8eb40",
"provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
"provider_name": "Facebook",
"user_id": "4222fd7c8db7ebcb042e0547e3b4e128"
}
}Create Auth
https://api.lytics.io/api/auth/{id}Create an auth, would normally never be used via the api, the web admin
Integrations section manages these.
URL Parameters
idrequiredstringQuery Parameters
account_idoptionalstringaccess_tokenoptionalstringHeaders
AuthorizationoptionalstringBody Parameters
provider_idoptionalstringconfigoptionalobject[]config[].nameoptionalstringconfig[].valueoptionalstring{
"provider_id": "our_provider",
"config": [
{
"name": "apikey",
"value": "value_that_will_get_encrypted"
}
]
}Update Auth
https://api.lytics.io/api/auth/{id}URL Parameters
idrequiredstringQuery Parameters
account_idoptionalstringaccess_tokenoptionalstringHeaders
Authorizationoptionalstring{
"status": "success",
"data": {
"account_id": "4f7b525bdba058fc096757a6",
"id": "1b53b88a06b418b07d601b6f57b8eb40",
"provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
"provider_name": "Facebook",
"user_id": "4222fd7c8db7ebcb042e0547e3b4e128"
}
}Remove an Auth
https://api.lytics.io/api/auth/{id}Deleting an auth is a very special operation. If any work is running (imports, exports),
it will remove the auth from those works and stop them.
URL Parameters
idrequiredstringQuery Parameters
account_idoptionalstringaccess_tokenoptionalstringHeaders
AuthorizationoptionalstringNo Content
Auth Create Token
https://api.lytics.io/api/auth/createtokenCreate Lytics api tokens.
Query Parameters
account_idoptionalstringHeaders
AuthorizationoptionalstringBody Parameters
expiresoptionalstringscopesoptionalstring[]nameoptionalstring{
"expires": "100h",
"scopes": [
"admin",
"data"
],
"name": "my-token-for-serivce-x"
}{
"status": "success",
"data": {
"account_id": "4f7b525bdba058fc096757a6",
"id": "1b53b88a06b418b07d601b6f57b8eb40",
"provider_id": "26cae7718c32180a7a0f8e19d6d40a59",
"name": "my-token-for-service-x",
"provider_name": "Lytics",
"config": [
{
"api_key": "api_value"
}
]
}
}