add support for app_token on SDK >= 1.2

please let me know if I can optimize something