aboutsummaryrefslogtreecommitdiff
path: root/easy-tg.c
diff options
context:
space:
mode:
Diffstat (limited to 'easy-tg.c')
-rw-r--r--easy-tg.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/easy-tg.c b/easy-tg.c
index e25f931..6bb2d56 100644
--- a/easy-tg.c
+++ b/easy-tg.c
@@ -82,6 +82,18 @@ cleanup:
return r;
}
+int tg_login_token(
+ const char *token
+ )
+{
+ int r = 0;
+ json_object *raw_req = json_object_new_string(token);
+ tg_send(false, tg_mkreq(TG_REQ_LOGIN_TOKEN, "checkAuthenticationBotToken", "token", raw_req), true);
+ goto cleanup;
+cleanup:
+ return r;
+}
+
int tg_login_code(
const char *code
)