Work in progress
This documentation page is currently work in progress.
Not all existing DecAPI endpoints are documented here yet - mostly Twitch and YouTube endpoints. The rest of the endpoints should have accurate documentation :)
For the currently active documentation, please visit docs.decapi.me.
Account age for a Twitch user
Gives you the "account age" of a Twitch user. In other words the amount of time passed since their account was created.
This works similar to twitch/creation.
Endpoint URL
https://decapi.me/twitch/accountage/TWITCH_USERNAME_HERE
See examples below for usage with an actual Twitch username.
Required URL parameters
user
- Required - Twitch username to get the account age for.
Query parameters
precision
- Optional - Maximum precision in the time returned. Defaults to 2, maximum is 7.- If the account is old enough, specifying 7 will give you: years, months, weeks, days, hours, minutes, and seconds.
- With the default precision of 2, you would only get years and months.
Examples
- How long since Decicus' Twitch account was created: https://decapi.me/twitch/accountage/decicus
- How long since Decicus' Twitch account was created with more precision, giving all values down to the second: https://decapi.me/twitch/accountage/decicus?precision=7
Examples for bots
Nightbot
Note: Nightbot will automatically convert variables, such as$(channel)
or $(touser)
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
$(urlfetch https://decapi.me/twitch/accountage/$(touser))
-
Get account age for a Twitch user specified after the command, with more precision
$(urlfetch https://decapi.me/twitch/accountage/$(touser)?precision=7)
Fossabot
Note: Fossabot will automatically convert variables, such as$(channel)
or $(user.login)
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
$(customapi https://decapi.me/twitch/accountage/$(user.login))
-
Get account age for a Twitch user specified after the command, with more precision
$(customapi https://decapi.me/twitch/accountage/$(user.login)?precision=7)
StreamElements
Note: StreamElements will automatically convert variables, such as${channel}
or ${touser}
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
${customapi.https://decapi.me/twitch/accountage/${touser}}
-
Get account age for a Twitch user specified after the command, with more precision
${customapi.https://decapi.me/twitch/accountage/${touser}?precision=7}
Streamlabs Chat Bot
Note: Streamlabs Chat Bot will automatically convert variables, such as$mychannel
or $touserid
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
$readapi(https://decapi.me/twitch/accountage/$touserid)
-
Get account age for a Twitch user specified after the command, with more precision
$readapi(https://decapi.me/twitch/accountage/$touserid?precision=7)
Streamlabs Cloudbot
Note: Streamlabs Cloudbot will automatically convert variables, such as{channel.name}
or {touser.name}
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
{readapi.https://decapi.me/twitch/accountage/{touser.name}}
-
Get account age for a Twitch user specified after the command, with more precision
{readapi.https://decapi.me/twitch/accountage/{touser.name}?precision=7}
Deepbot
Note: Deepbot will automatically convert variables, such as@stream@
or @user@
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
@customapi@[https://decapi.me/twitch/accountage/@user@]
-
Get account age for a Twitch user specified after the command, with more precision
@customapi@[https://decapi.me/twitch/accountage/@user@?precision=7]
PhantomBot
Note: PhantomBot will automatically convert variables, such as(channelname)
or (touser)
to the correct channel name / username, when the command is used.
You do not have to change those variables.
-
Get account age for a Twitch user specified after the command
(customapi https://decapi.me/twitch/accountage/(touser))
-
Get account age for a Twitch user specified after the command, with more precision
(customapi https://decapi.me/twitch/accountage/(touser)?precision=7)