{"id":2127,"date":"2018-09-19T22:40:51","date_gmt":"2018-09-19T13:40:51","guid":{"rendered":"http:\/\/matoken.org\/blog\/?p=2127"},"modified":"2018-09-19T22:40:51","modified_gmt":"2018-09-19T13:40:51","slug":"two-factor-authentication-using-nextgram-14-telegram","status":"publish","type":"post","link":"https:\/\/matoken.org\/blog\/2018\/09\/19\/two-factor-authentication-using-nextgram-14-telegram\/","title":{"rendered":"Nextcloud 14 \u306e Telegram \u3092\u4f7f\u3063\u305f2\u8981\u7d20\u8a8d\u8a3c"},"content":{"rendered":"<div id=\"preamble\">\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-1__\" class=\"paragraph\">\n<p>\u5148\u65e5\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u30bd\u30d5\u30c8\u306e Nextcloud 14\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-2__\" class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/nextcloud.com\/blog\/nextcloud-14-now-available-with-video-verification-signaltelegram-2fa-support-improved-collaboration-and-gdpr-compliance\/\">Nextcloud 14 now available with Video Verification, Signal\/Telegram 2FA support, Improved Collaboration and GDPR compliance \u2013 Nextcloud<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div id=\"__asciidoctor-preview-3__\" class=\"paragraph\">\n<p>\u65b0\u6a5f\u80fd\u306e\u3046\u3061Signal\/Telegram\/SMS \u306b\u3088\u308b2\u8981\u7d20\u8a8d\u8a3c\u306e\u30b5\u30dd\u30fc\u30c8\u304c\u6c17\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-4__\" class=\"quoteblock\">\n<blockquote>\n<div id=\"__asciidoctor-preview-5__\" class=\"paragraph\">\n<p>Signal\/Telegram\/SMS 2FA support<br \/>\nA new 2-factor authentication provider named \u2018gateway\u2019 was introduced which allows users to use the secure messaging apps Signal and Telegram as well as various SMS gateways as second factor to secure their authentication.<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div id=\"__asciidoctor-preview-6__\" class=\"paragraph\">\n<p>SMS\u306fplaySMS, websms.de\u3092\u5229\u7528\u3059\u308b\u3088\u3046\u3067\u3059\uff0eSignal\u3082Telegram\u3082\u30bb\u30ad\u30e5\u30a2\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u30f3\u30b0\u30b5\u30fc\u30d3\u30b9\u306a\u306e\u3067\u3053\u3046\u3044\u3046\u7528\u9014\u306b\u5411\u3044\u3066\u3044\u305d\u3046\u3067\u3059\uff0e\u3069\u3061\u3089\u3082\u516c\u5f0f\u3067Linux x86_64\u306e\u30c7\u30b9\u30af\u30c8\u30c3\u30d7\u30a2\u30d7\u30ea\u304c\u63d0\u4f9b\u3055\u308c\u3066\u3044\u307e\u3059\uff0e\u30a2\u30d7\u30ea\u306e\u51fa\u6765\u306f\u4eca\u306e\u6240Telegram\u306e\u307b\u3046\u304c\u4e0a\u3060\u3068\u601d\u3044\u307e\u3059\uff0eArm Linux\u3060\u3068\u516c\u5f0f\u306e\u3082\u306e\u306f\u306a\u3044\u306e\u3067\u3059\u304c\uff0cTelegram\u306b\u3064\u3044\u3066\u306fCLI\u306e\u30a2\u30d7\u30ea\u304c\u3042\u308a\uff0cRaspberry Pi \u306e Raspbian stretch \u3067\u3082\u8981patch\u3067\u52d5\u4f5c\u3057\u307e\u3057\u305f\uff0e(Web\u30a2\u30d7\u30ea\u3082\u3042\u308b\u306e\u3067\u305d\u3061\u3089\u3067\u3082\u52d5\u4f5c\u3059\u308b\u3068\u601d\u3046\u304c\u672a\u78ba\u8a8d)<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-7__\" class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/playsms.org\/\">Free and Open Source SMS Gateway<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/websms.de\/\">Professionelle Business Messaging Produkte &#8211; websms| Mobile Messaging Deutschland<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.signal.org\/\">Signal &gt;&gt; Home<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.telegram.org\/\">Telegram Messenger<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/vysheng\/tg\">vysheng\/tg: telegram-cli<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/matoken.org\/blog\/2018\/09\/19\/try-telegram-cli-of-informal-cli-client-of-telegram\/\">Telegram \u306e\u975e\u516c\u5f0fcli client \u306e telegram-cli \u3092\u8a66\u3059 \u2013 matoken\u2019s meme<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div id=\"__asciidoctor-preview-8__\" class=\"paragraph\">\n<p>SMS\u306f\u3084\u3063\u305f\u3053\u3068\u304c\u3042\u308b\u3057\uff0cTelegram \u304c\u4f7f\u3044\u3084\u3059\u3044\uff0e\u3066\u3053\u3068\u3067Telegram\u306e\u8a2d\u5b9a\u3092\u3057\u3066\u307f\u307e\u3057\u305f\uff0e\u307e\u3060\u672a\u5b9f\u88c5\u306a\u6a5f\u80fd\u304c\u591a\u304f\u3061\u3087\u3063\u3068\u9762\u5012\u306a\u306e\u3067\u30e1\u30e2\u3057\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<\/div>\n<\/div>\n<div id=\"toc\" class=\"toc\">\n<div id=\"toctitle\">Table of Contents<\/div>\n<ul class=\"sectlevel1\">\n<li><a href=\"#_two_factor_gateway_\u306e\u5c0e\u5165\">Two-Factor Gateway \u306e\u5c0e\u5165<\/a><\/li>\n<li><a href=\"#_telegram_bot_\u306e\u4f5c\u6210\">Telegram Bot \u306e\u4f5c\u6210<\/a>\n<ul class=\"sectlevel2\">\n<li><a href=\"#_botfather_\u3068\u4f1a\u8a71\u3057\u3066bot\u4f5c\u6210\">BotFather \u3068\u4f1a\u8a71\u3057\u3066bot\u4f5c\u6210<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#_occ_\u30b3\u30de\u30f3\u30c9\u3067_telegram_bot_\u306e\u30c8\u30fc\u30af\u30f3\u8a2d\u5b9a\">occ \u30b3\u30de\u30f3\u30c9\u3067 Telegram bot \u306e\u30c8\u30fc\u30af\u30f3\u8a2d\u5b9a<\/a>\n<ul class=\"sectlevel2\">\n<li><a href=\"#_telegram_bot_\u306e_chat_id_\u3092\u8abf\u3079\u3066\u767b\u9332\u3059\u308b\">Telegram bot \u306e chat_id \u3092\u8abf\u3079\u3066\u767b\u9332\u3059\u308b<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#_telegram_\u8a8d\u8a3c\u3092\u8a66\u3059\">Telegram \u8a8d\u8a3c\u3092\u8a66\u3059<\/a><\/li>\n<li><a href=\"#_\u3081\u3093\u3069\u304f\u3055\u3044\">\u3081\u3093\u3069\u304f\u3055\u3044\u2026\u2026<\/a><\/li>\n<li><a href=\"#_\u74b0\u5883\">\u74b0\u5883<\/a><\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_two_factor_gateway_\u306e\u5c0e\u5165\">Two-Factor Gateway \u306e\u5c0e\u5165<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-9__\" class=\"paragraph\">\n<p>Nextcloud 14\u306b Two-Factor Gateway \u30a2\u30d7\u30ea\u3092\u5c0e\u5165\u3057\u307e\u3059\uff0e\u7ba1\u7406\u8005\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u300c\u30a2\u30d7\u30ea\u300d\u306e\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u304b\u3089\u5c0e\u5165\u3059\u308b\u306e\u304c\u697d\u3067\u3057\u3087\u3046\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-10__\" class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/apps.nextcloud.com\/apps\/twofactor_gateway\">Two-Factor Gateway &#8211; \u30a2\u30d7\u30ea &#8211; App Store &#8211; Nextcloud<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div id=\"__asciidoctor-preview-11__\" class=\"paragraph\">\n<p>\u5c0e\u5165\u3059\u308b\u3068Nextcloud\u306e\u300c\u8a2d\u5b9a\u300d\u306e\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u306e\u4e2d\u306b\u300cMessage gateway second-factor auth\u300d\u3068\u3044\u3046\u9805\u76ee\u304c\u73fe\u308c\u307e\u3059\u304c\uff0c\u8a2d\u5b9a\u304c\u51fa\u6765\u307e\u305b\u3093\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-12__\" class=\"paragraph\">\n<p>GitHub\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u307f\u308b\u3068\u672a\u3060\u672a\u5b9f\u88c5\u306e\u6a5f\u80fd\u304c\u591a\u3044\u3088\u3046\u3067\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-13__\" class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/github.com\/nextcloud\/twofactor_gateway\">nextcloud\/twofactor_gateway: &#x1f511; Second factor provider using an external messaging gateway (SMS, Telegram, Signal)<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/github.com\/nextcloud\/twofactor_gateway\/tree\/master\/doc\/admin\">twofactor_gateway\/doc\/admin at master \u00b7 nextcloud\/twofactor_gateway<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_telegram_bot_\u306e\u4f5c\u6210\">Telegram Bot \u306e\u4f5c\u6210<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-14__\" class=\"paragraph\">\n<p>TOTP\u30b3\u30fc\u30c9\u306e\u9001\u4fe1\u3059\u308b Telegram Bot \u3092\u4f5c\u6210\u3057\u307e\u3059\uff0e\u4f5c\u6210\u306fTelegram \u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u3092\u53c2\u7167\u3057\u3066\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-15__\" class=\"ulist\">\n<ul>\n<li>\n<p><a href=\"https:\/\/core.telegram.org\/bots\">Bots: An introduction for developers<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/core.telegram.org\/bots\/api\">Telegram Bot API<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_botfather_\u3068\u4f1a\u8a71\u3057\u3066bot\u4f5c\u6210\">BotFather \u3068\u4f1a\u8a71\u3057\u3066bot\u4f5c\u6210<\/h3>\n<div id=\"__asciidoctor-preview-16__\" class=\"paragraph\">\n<p>BotFather \u3068\u3044\u3046 bot \u7ba1\u7406\u7528\u306e bot \u304c\u5c45\u308b\u306e\u3067\uff0c\u4f1a\u8a71\u3057\u3066bot \u3092\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-17__\" class=\"paragraph\">\n<div class=\"title\">\u30a2\u30a4\u30b3\u30f3\u3061\u3087\u3063\u3068\u6016\u3044<\/div>\n<p><a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/44062365934\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1846\/44062365934_5aabe8f64d_m.jpg?atomcache=1537364237616\" alt=\"44062365934 5aabe8f64d m\"\/><\/span><\/a><\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-18__\" class=\"paragraph\">\n<p><code style=\"font-family: monospace;\">\/newbot<\/code> \u30b3\u30de\u30f3\u30c9\u3067\u65b0\u3057\u3044 bot \u306e\u4f5c\u6210\u304c\u59cb\u307e\u308a\u307e\u3059\uff0ebot\u306e\u540d\u524d\u3092\u52b9\u304b\u308c\u308b\u306e\u3067\u7b54\u3048\u307e\u3059\uff0e\u7d9a\u3044\u3066 bot \u306e <code style=\"font-family: monospace;\">username<\/code> \u3092\u6c42\u3081\u3089\u308c\u307e\u3059\uff0e\u3053\u306e username \u306f\u6700\u5f8c\u306b <code style=\"font-family: monospace;\">bot<\/code> \u3068\u3064\u3051\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<br \/>\n\u6210\u529f\u3059\u308b\u3068\u30a2\u30af\u30bb\u30b9\u30c8\u30fc\u30af\u30f3\u304c\u8868\u793a\u3055\u308c\u308b\u306e\u3067\u30e1\u30e2\u3057\u3066\u6b21\u306e\u624b\u65ec\u306b\u79fb\u308a\u307e\u3059\uff0e\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f <code style=\"font-family: monospace;\">640093430:AAFTa_pSAcKCZWeFoVDt-l7h7ewqzNe0Luo<\/code> \u304c\u30c8\u30fc\u30af\u30f3\u3067\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-19__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>Done! Congratulations on your new bot. You will find it at t.me\/matoken_bot. You can now add a description, about section and profile picture for your bot, see \/help for a list of commands. By the way, when you've finished creating your cool bot, ping our Bot Support if you want a better username for it. Just make sure the bot is fully operational before you do this.\r\n\r\nUse this token to access the HTTP API:\r\n640093430:AAFTa_pSAcKCZWeFoVDt-l7h7ewqzNe0Luo\r\n\r\nFor a description of the Bot API, see this page: https:\/\/core.telegram.org\/bots\/api<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-20__\" class=\"paragraph\">\n<p><a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/30910879338\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1870\/30910879338_4609b7a707.jpg?atomcache=1537364237616\" alt=\"30910879338 4609b7a707\"\/><\/span><\/a><br \/>\n<a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/44781979421\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1863\/44781979421_aac86c72de.jpg?atomcache=1537364237616\" alt=\"44781979421 aac86c72de\"\/><\/span><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_occ_\u30b3\u30de\u30f3\u30c9\u3067_telegram_bot_\u306e\u30c8\u30fc\u30af\u30f3\u8a2d\u5b9a\">occ \u30b3\u30de\u30f3\u30c9\u3067 Telegram bot \u306e\u30c8\u30fc\u30af\u30f3\u8a2d\u5b9a<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-21__\" class=\"paragraph\">\n<p>Nextcloud \u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u5834\u6240\u306b Nextcloud \u7ba1\u7406\u7528\u306e <code style=\"font-family: monospace;\">occ<\/code> \u30b3\u30de\u30f3\u30c9\u304c\u3042\u308a\u307e\u3059\uff0e\u3053\u306e\u30b3\u30de\u30f3\u30c9\u3067 Telegram bot \u306e\u30c8\u30fc\u30af\u30f3\u3092\u8a2d\u5b9a\u3057\u307e\u3059\uff0e<br \/>\n\u30c8\u30fc\u30af\u30f3\u306e <code style=\"font-family: monospace;\">640093430:<\/code> \u90e8\u5206\u306f\u7701\u3044\u3066\u305d\u306e\u5f8c\u308d\u3060\u3051\u3092\u5165\u529b\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-22__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo -u www-data php .\/occ twofactorauth:gateway:configure telegram\r\nPlease enter your Telegram bot token: AAFTa_pSAcKCZWeFoVDt-l7h7ewqzNe0Luo\r\nUsing AAFTa_pSAcKCZWeFoVDt-l7h7ewqzNe0Luo.\r\n$ sudo -u www-data php .\/occ twofactorauth:gateway:status\r\nSignal gateway: not configured\r\nSMS gateway: not configured\r\nTelegram gateway: configured<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-23__\" class=\"paragraph\">\n<p>\u3072\u3068\u307e\u305a\u3053\u308c\u3067\u7ba1\u7406\u8005\u5074\u306e\u8a2d\u5b9a\u306f\u7d42\u4e86\u3067\u3059\uff0e<\/p>\n<\/div>\n<div class=\"sect2\">\n<h3 id=\"_telegram_bot_\u306e_chat_id_\u3092\u8abf\u3079\u3066\u767b\u9332\u3059\u308b\">Telegram bot \u306e chat_id \u3092\u8abf\u3079\u3066\u767b\u9332\u3059\u308b<\/h3>\n<div id=\"__asciidoctor-preview-24__\" class=\"paragraph\">\n<p>\u3053\u3053\u304b\u3089\u306fNextcloud \u306e\u5229\u7528\u30a2\u30ab\u30a6\u30f3\u30c8\u3067\u306e\u64cd\u4f5c\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-25__\" class=\"quoteblock\">\n<blockquote>\n<div id=\"__asciidoctor-preview-26__\" class=\"paragraph\">\n<p>Telegram<br \/>\nIn order to receive authentication codes via Telegram, you first have to start a new chat with the bot set up by your admin.<br \/>\nSecondly, you have to obtain your Telegram ID via the ID Bot. Enter this ID to receive your verification code below.<\/p>\n<p>You are not using Telegram for two-factor authentication at the moment. Enable<\/p>\n<\/div>\n<\/blockquote>\n<\/div>\n<div id=\"__asciidoctor-preview-27__\" class=\"paragraph\">\n<p>Telegram \u30a2\u30d7\u30ea\u3092\u5229\u7528\u3057\u3066\uff0cTelegram \u306e bot \u304b\u3089 TOTP\u30b3\u30fc\u30c9\u3092\u53d7\u3051\u53d6\u308a\u305f\u3044 Telegram \u30a2\u30ab\u30a6\u30f3\u30c8\u306b\u9069\u5f53\u306a\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u6295\u3052\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-28__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>@matoken hello<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-29__\" class=\"paragraph\">\n<p>\u305d\u306e\u5f8c\uff0cTelegram API \u3092\u5229\u7528\u3057\u3066\u30e1\u30c3\u30bb\u30fc\u30b8\u3092\u53d6\u5f97\u3057\u3066 chat_id \u3092\u8abf\u3079\u307e\u3059\uff0e<br \/>\n\u4ee5\u4e0b\u306e\u4f8b\u3067\u306f <code style=\"font-family: monospace;\">475721977<\/code> \u3067\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-30__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ curl https:\/\/api.telegram.org\/bot640093430:AAHu9u_c12KC2PY8g22QZoA94u4tAJvxsvY\/getUpdates | jq\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   358  100   358    0     0    315      0  0:00:01  0:00:01 --:--:--   315\r\n{\r\n  \"ok\": true,\r\n  \"result\": [\r\n    {\r\n      \"update_id\": 612249686,\r\n      \"message\": {\r\n        \"message_id\": 9,\r\n        \"from\": {\r\n          \"id\": 475721977,\r\n          \"is_bot\": false,\r\n          \"first_name\": \"matoken\",\r\n          \"username\": \"matoken\",\r\n          \"language_code\": \"En\"\r\n        },\r\n        \"chat\": {\r\n          \"id\": 475721977,\r\n          \"first_name\": \"matoken\",\r\n          \"username\": \"matoken\",\r\n          \"type\": \"private\"\r\n        },\r\n        \"date\": 1537282406,\r\n        \"text\": \"@matoken hello\",\r\n        \"entities\": [\r\n          {\r\n            \"offset\": 0,\r\n            \"length\": 8,\r\n            \"type\": \"mention\"\r\n          }\r\n        ]\r\n      }\r\n    }\r\n  ]\r\n}<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-31__\" class=\"paragraph\">\n<p>\u8a66\u3057\u306b\u9001\u4fe1\u3057\u3066\u307f\u3066 Telegram \u30a2\u30d7\u30ea\u306b bot \u304b\u3089\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u98db\u3093\u3067\u304d\u305f\u3089 chat id \u304c\u6b63\u3057\u3044\u306f\u305a\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-32__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ curl -X POST \"https:\/\/api.telegram.org\/bot640093430:AAHu9u_c12KC2PY8g22QZoA94u4tAJvxsvY\" -d \"chat_id=475721977&amp;text=hello\" | jq\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n100   274  100   246  100    28    179     20  0:00:01  0:00:01 --:--:--   200\r\n{\r\n  \"ok\": true,\r\n  \"result\": {\r\n    \"message_id\": 15,\r\n    \"from\": {\r\n      \"id\": 640093430,\r\n      \"is_bot\": true,\r\n      \"first_name\": \"matoken_bot\",\r\n      \"username\": \"matoken_bot\"\r\n    },\r\n    \"chat\": {\r\n      \"id\": 475721977,\r\n      \"first_name\": \"matoken\",\r\n      \"username\": \"matoken\",\r\n      \"type\": \"private\"\r\n    },\r\n    \"date\": 1537312183,\r\n    \"text\": \"hello\"\r\n  }\r\n}<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-33__\" class=\"paragraph\">\n<p>Nextcloud \u306b\u30ed\u30b0\u30a4\u30f3\u3057\u3066\uff0c\u300c\u8a2d\u5b9a\u300d\u2192\u300c\u30bb\u30ad\u30e5\u30ea\u30c6\u30a3\u300d\u306e\u4e0b\u90e8\u306b\u300cMessage gateway second-factor auth\u300d\u3068\u3044\u3046\u9805\u76ee\u304c\u51fa\u6765\u3066\u3044\u308b\u306e\u3067\u300cEnable\u300d\u3092\u62bc\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-34__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>Telegram\r\nIn order to receive authentication codes via Telegram, you first have to start a new chat with the bot set up by your admin.\r\nSecondly, you have to obtain your Telegram ID via the ID Bot. Enter this ID to receive your verification code below.\r\n\r\nYou are not using Telegram for two-factor authentication at the moment. Enable<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-35__\" class=\"paragraph\">\n<p>\u4ee5\u4e0b\u306e\u30e1\u30c3\u30bb\u30fc\u30b8\u304c\u8868\u793a\u3055\u308c\u305f\u3089 <code style=\"font-family: monospace;\">chat_id<\/code> \u3092\u5165\u529b\u3057\u3066 <code style=\"font-family: monospace;\">Verify<\/code> \u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-36__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>Enter your identification (e.g. phone number to start the verification):\r\n Verify<\/pre>\n<\/div>\n<\/div>\n<div id=\"__asciidoctor-preview-37__\" class=\"paragraph\">\n<p>Telegram \u3067 TOTP\u30b3\u30fc\u30c9\u304c\u98db\u3093\u3067\u6765\u308b\u306e\u3067\u305d\u308c\u3092\u5165\u529b\u3057\u305f\u3089OK\u3067\u3059\uff0e<br \/>\n\u4e00\u65e6\u30ed\u30b0\u30a2\u30a6\u30c8\u3057\u3066\u8a66\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_telegram_\u8a8d\u8a3c\u3092\u8a66\u3059\">Telegram \u8a8d\u8a3c\u3092\u8a66\u3059<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-38__\" class=\"paragraph\">\n<p>\u3044\u3064\u3082\u306e\u3088\u3046\u306b\u30e6\u30fc\u30b6\u540d\uff0c\u30d1\u30b9\u30ef\u30fc\u30c9\u3067\u8a8d\u8a3c\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u753b\u9762\u306b\u9077\u79fb\u3057\u307e\u3059\uff0e<br \/>\n\u300cAuthenticate via Telegram\u300d\u3092\u62bc\u3057\u307e\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-39__\" class=\"paragraph\">\n<p><a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/44781965201\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1894\/44781965201_94bd9ca33e.jpg?atomcache=1537364237617\" alt=\"44781965201 94bd9ca33e\"\/><\/span><\/a><\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-40__\" class=\"paragraph\">\n<p>Telegram \u304b\u3089\u8a8d\u8a3c\u30b3\u30fc\u30c9\u304c\u98db\u3093\u3067\u304f\u308b\u306e\u3067\u305d\u308c\u3092\u5165\u529b\u3057\u3066\u8a8d\u8a3c\u5b8c\u4e86\u3067\u3059\uff0e<\/p>\n<\/div>\n<div id=\"__asciidoctor-preview-41__\" class=\"paragraph\">\n<p><a href=\"https:\/\/www.flickr.com\/photos\/119142834@N05\/30910872108\/in\/datetaken\/\"><span class=\"image\"><img decoding=\"async\" src=\"https:\/\/farm2.staticflickr.com\/1880\/30910872108_2d5e8c21eb.jpg?atomcache=1537364237617\" alt=\"30910872108 2d5e8c21eb\"\/><\/span><\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u3081\u3093\u3069\u304f\u3055\u3044\">\u3081\u3093\u3069\u304f\u3055\u3044\u2026\u2026<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-42__\" class=\"paragraph\">\n<p>\u672a\u3060\u624b\u9806\u304c\u9762\u5012\u3067\u4e00\u822c\u30e6\u30fc\u30b6\u306b\u8a66\u3057\u3066\u304f\u308c\u3068\u8a00\u3048\u308b\u72b6\u614b\u3067\u306f\u306a\u3044\u3067\u3059\u306d\uff0e\u3067\u3082\u6b21\u306e\u30ea\u30ea\u30fc\u30b9\u3042\u305f\u308a\u3067\u306f\u7c21\u5358\u306b\u306a\u308b\u3093\u3058\u3083\u306a\u3044\u3067\u3057\u3087\u3046\u304b\uff0e<\/p>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"sect1\">\n<h2 id=\"_\u74b0\u5883\">\u74b0\u5883<\/h2>\n<div class=\"sectionbody\">\n<div id=\"__asciidoctor-preview-43__\" class=\"listingblock\">\n<div class=\"content\">\n<pre>$ sudo -u www-data php .\/occ app:list|grep twofactor_|grep :\r\n  - twofactor_backupcodes: 1.3.1\r\n  - twofactor_gateway: 0.9.0\r\n  - twofactor_totp: 1.5.0\r\n$ sudo -u www-data php .\/occ -V\r\nNextcloud 14.0.0\r\n$ lsb_release -d\r\nDescription:    Ubuntu 16.04.5 LTS\r\n$ uname -m\r\nx86_64<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u5148\u65e5\u30d5\u30a1\u30a4\u30eb\u5171\u6709\u30bd\u30d5\u30c8\u306e Nextcloud 14\u304c\u30ea\u30ea\u30fc\u30b9\u3055\u308c\u307e\u3057\u305f\uff0e Nextcloud 14 now available with Video Verification, Signal\/Telegram 2FA s [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"webmentions_disabled_pings":false,"webmentions_disabled":false,"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[6,63,152],"tags":[316,405,298],"class_list":["post-2127","post","type-post","status-publish","format-standard","hentry","category-linux","category-ubuntu","category-xenial16-04","tag-nextcloud","tag-telegram","tag-totp"],"_links":{"self":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2127","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/comments?post=2127"}],"version-history":[{"count":0,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/posts\/2127\/revisions"}],"wp:attachment":[{"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/media?parent=2127"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/categories?post=2127"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/matoken.org\/blog\/wp-json\/wp\/v2\/tags?post=2127"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}