Git Product home page Git Product logo

sdk's Introduction

This service will be shut down on 25th May 2018

Due to many reasons, we're going to shut down this service soon. You can use these alternatives:

  • Chatbase — bot analytics from Google,
  • Dashbot,
  • Botanalytics,
  • Amplitude — it has generous free plan with 10M events per month. It's a powerful analytics but have nothing specific to bots.

About this service

Botan is a telegram bot analytics system based on Yandex.Appmetrica. In this document you can find how to setup Yandex.Appmetrica account, as well as examples of Botan SDK usage.

Botan has 2 main use cases:

Creating an account

  • Register at http://appmetrica.yandex.com/
  • After registration you will be prompted to create Application. Please use @YourBotName as a name.
  • Save an API key from settings page, you will use it as a token for Botan API calls.
  • Download lib for your language, and use it as described below. Don`t forget to insert your token!

SDK usage

We have libraries for the following languages:

Alternatively, you can use Botan API via plain HTTP calls.

In case your preferred language is missed, you can make a contribution. It's easy — library usually contains 30 lines of code.

Also, pay attention to "what data to put into tracking data" section. 90% benefit from analytics usage lies in right integration;)

JavaScript example

Install npm: npm install botanio

var botan = require('botanio')(token);

botan.track(message, 'Start');

var uid = message.from.id;
var url = 'https://github.com/'; // some url you want to send to user
botan.shortenUrl(uid, url, function (err, res, body) {
  if (err) {
    console.error(err);
  } else {
    console.log(body); // shortened url here
  }
});

Python example

You need to install requests library to use python botan lib. You can do it with

pip install requests

Code:

	import botan

	botan_token = '.........' # Token got from @botaniobot
	uid = message.from_user
	message_dict = message.to_dict()
	event_name = update.message.text
	print botan.track(botan_token, uid, message_dict, event_name)

	.....

	original_url = ... # some url you want to send to user
	short_url = botan.shorten_url(original_url, botan_token, uid)
	# now send short_url to user instead of original_url, and get geography, OS, Device of user

PHP example

You need to put the class in a convenient place.

private $token = 'token';

public function _incomingMessage($message_json) {
    $messageObj = json_decode($message_json, true);
    $messageData = $messageObj['message'];

    $botan = new Botan($this->token);
    $botan->track($messageData, 'Start');

    ...

    $original_url = ...
    $uid = $message['from']['id']
    $short_url = $botan->shortenUrl($url, $uid)
    // now send short_url to user instead of original_url, and get geography, OS, Device of user
}

Ruby example

uid is a user id you get from Telegram.

require_relative 'botan'
token = 1111
uid = 1
message = { text: 'text' }
puts Botan.track(token, uid, message, 'Search')

Rust example

extern crate rustc_serialize;

extern crate botanio;

use botanio::{Botan};

#[derive(Debug, RustcEncodable)]
struct Message {
    some_metric: u32,
    another_metric: u32,
}

fn main() {
    let token = "1111";
    let uid = 1;
    let name = "Search";
    let message = Message {some_metric: 100, another_metric: 500};

    let botan = Botan::new(token);
    botan.track(uid, name, &message).unwrap();
}

Java example

try (CloseableHttpAsyncClient client = HttpAsyncClients.createDefault()) {
    client.start();
    Botan botan = new Botan(client, new ObjectMapper());
    botan.track("1111", "1", ImmutableMap.of("some_metric": 100, "another_metric": 500), "Search").get();
}

Go example

package main

import (
	"fmt"

	"github.com/botanio/sdk/go"
)

type Message struct {
	SomeMetric    int
	AnotherMetric int
}

func main() {
	ch := make(chan bool) // Channel for synchronization

	bot := botan.New("1111")
	message := Message{100, 500}

	// Asynchronous track example
	bot.TrackAsync(1, message, "Search", func(ans botan.Answer, err []error) {
		fmt.Printf("Asynchonous: %+v\n", ans)
		ch <- true // Synchronization send
	})

	// Synchronous track example
	ans, _ := bot.Track(1, message, "Search")
	fmt.Printf("Synchronous: %+v\n", ans)

	<-ch // Synchronization receive
}

Haskell example

import           Network.HTTP.Client      (newManager)
import           Network.HTTP.Client.TLS  (tlsManagerSettings)
import           Servant.Client
import           Web.Botan.Sdk
import           GHC.Generics
import           Data.Aeson
import           Control.Concurrent.Async

main :: IO ()
main = do
  manager <- runIO $ newManager tlsManagerSettings
  let message = toJSON $ AnyMessage "A" "B"
  a <- async $ track "token" "user2222" message "test_action" manager
  res <- wait a -- not real use case
  print res

data AnyMessage = AnyMessage
  { 
    a :: Text
  , b :: Text
  } deriving (Show, Generic, ToJSON)

HTTP API

Track message

The base url is: https://api.botan.io/track

You should put data to Botan using POST method.

The url should look like https://api.botan.io/track?token=API_KEY&uid=UID&name=EVENT_NAME

Please provide a json document as the post body.

API response is a json document:

  • on success: {"status": "accepted"}
  • on failure: {"status": "failed"} or {"status": "bad request", "info": "some_additional_info_about_error"}

Shorten url

Send GET request to

https://api.botan.io/s/?token={token}&url={original_url}&user_ids={user_id}

You get shortened url in a plain-text response (in case the response code was 200). Codes other than 200 mean that an error occurred.

Also, in case of group chats you can add several user_ids: &user_ids={user_id_1},{user_id_2},{user_id_3}, but currently this data will not be used (because we don't know which particular user clicked link).

What to put into tracking data

###Basic integration

botan.track(<botan_token>, <user_who_wrote_to_bot>, <user_message_in_json_format>, <command_name>)
  • command_name - we recommend to put here not just message text, but command. Example: user wrote '/search californication', put to command_name 'Search'. This will help you to aggregate type of user's input and get such report: Result of basic usage of botan
  • user_message_in_json_format - whole message got from Telegram. For example, using python-telegram-bot you can do it in such way: message.to_dict(). Passing whole message, you will be able to see nice data like number of group chats among all chats: Group and private chats amount Also you will be able to get userids who performed some particular action (through segmentation) or your most active users and contact them: Most active users who did particular events

###Advanced integration Actually, most benefit from analytics usage lies in sending right events with right data inside. Here is some best practices we recommend. Feel free to contribute your ways or improve existing ones.

#####Commands order That's how you can see what command users execute after which:

botan.track(<botan_token>, <user_who_wrote_to_bot>, {last_command: current_command}, "command_order")

Also you can send not pairs, but triples of commands:

botan.track(<botan_token>, <user_who_wrote_to_bot>, {before_last_command: {last_command: current_command}}, "command_order")

Using this, we can see, for example, what commands users execute after /start: Commands after start #####Date cohorts Here is how you can tag every user with time cohort based on what was his first day at your service. Later you can use to see how your bot's performance has changed over time:

if this_is_first_occurence_of_user:
    botan.track(<botan_token>,
                <user_who_wrote_to_bot>,
                {
                        'daily': message.date.strftime('%Y-%m-%d'),
                        'weekly': (message.date - datetime.timedelta(message.date.weekday())).strftime('%Y-%m-%d'),
                        'monthly': message.date.strftime('%Y-%m')
                },
                'cohorts')

Get user profiles by wrapping links

###How it works You create unique short link for each pair (user, link). When user clicks the link, Botan stores his user agent, IP address and other stuff. After that you'll be able to use user segmentation by geography, language, device and operating system (and see corresponding statistics).

###What url to wrap We suggest you to wrap every url that you send to user. Most often use case is sending "please rate us" link — most popular bots asks for rating in storebot.me.

###What you will get You'll get a lot of useful new data in the web interface:

Countries, regions and cities Countries and regions/cities

Devices Devices

Operating systems Operating systems

Locales Locales

###How to use Here you can find examples for Python, PHP. Feel free to make pull requests with wrappers for other languages (here's HTTP spec for the shortener).

##Contribution We are welcome any contributions as pull-requests!

Feel free to write more libraries for the languages we are not supporting yet.

sdk's People

Contributors

aydarbiktimirov avatar ayumukasuga avatar codefuhrer avatar ei-grad avatar hr0nix avatar iprit avatar ketothxupack avatar klappvisor avatar knsd avatar kugaevsky avatar libertypaul avatar mastergroosha avatar megatolya avatar ollmer avatar pshishkin avatar rockneurotiko avatar shade33 avatar sonkodmitry avatar strikeentco avatar yurich avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sdk's Issues

Some fields questions.

I'm going to add Botan to go-tgbot and some of my bots, and now I have some questions.

What are the fields uid and name?

I guess that name it's the name of the command activated.

And uid? The id of the user? The id of the message? The update id? An internal count id?

Thanks!

http api list?

According to your readme there is the &name=EVENT_NAME parameter to send events to appmetrica.
Are there some other parameters to send like a fake user session generated by the bot to increment user data, or send errors?

If there are no other parameters is the a way to directly make posts request to appmetrica?

API is not responsing

Прямо сейчас api.botan.io не отвечает на запросы (и несколько раз в течении сегодняшнего дня были такие же проблемы временами).

При чем, что самое странное, ограничение по таймауту в curl не срабатывает при тесте:
$ time curl -I --connect-timeout 1 'https://api.botan.io/track?token=TOKEN&uid=1&name=test'
^C

real 0m29.395s

Вместо TOKEN использую реальный (секретный) токен взятый с appmetrica.yandex.com .
Из-за этого бот перестает работать. Приходится отключать логирование.
Судя по тому, что некоторые боты перестают отвечать на запросы я не одинок.

WTF?

How to define LIB to bot?

Hi friends
I'd like to use Botan analytics via Yandex Appmetrica platform to track my channel's audiences
I follow the instructions in Github (https://github.com/botanio/sdk)
I setup a bot using "botfather" and define it in @botaniobot. Now I have two tokens from those. Also I create an account in Yandex website and I have an API Key in Yandex too.
I was download "sdk-master.zip" file from github instruction.
What I should to do next, to have my bot's detailed reports in appmetrica.yandex.com
I'm new in programming. Any comment is appreciated.

URL shortener returns different URLs for the same input

$ http https://api.botan.io/s/\?token\=\$TOKEN\&url\=http://ya.ru\&user_ids\=1000
HTTP/1.1 200 OK
Connection: keep-alive
Date: Tue, 12 Jan 2016 05:20:36 GMT
Server: nginx/1.9.9
Transfer-Encoding: chunked

https://telgr.me/wDi4HWrQ

$ http https://api.botan.io/s/\?token\=\$TOKEN\&url\=http://ya.ru\&user_ids\=1000
HTTP/1.1 200 OK
Connection: keep-alive
Date: Tue, 12 Jan 2016 05:20:37 GMT
Server: nginx/1.9.9
Transfer-Encoding: chunked

https://telgr.me/wWfNIm55

$

A quote from the documentation:

You create unique short link for each pair (user, link).

Что там с ключами?

Видел, что перегенерили ключи, но когда именно, не понял.

  1. Почему не оповестили по почте о новых ключах?
  2. Когда точно старые ключи отвалятся?

Improve IP geolocation

Currently I have 2500 clicks on shortened links, but 99.8% is displayed in stats as "Botswana" 😒

Please do something with that. Maybe CloudFlare can help with detection.

Inline query not tracked

Hi, I'm new to the sdk so this may not be an issue. My bot succesfuly tracks commands or text messages, but fails with inline query. I'm using python and python-telegram-bot. If I print the botan.track() call everything is as the other calls, and the response is {'status':'accepted'}. Could it be because of the lack of uid and message object? Thank you

{"status" : "bad request", "info" : "name required"}

На такой объект ругается:
{"message_id":123,"from":{"username":"mynickname","first_name":"Alex","id":123,"last_name":"L"},"chat":{"last_name":"L","id":123,"username":"mychat","first_name":"Name"},"text":"takoe","date":1444689127}

Чего ему не хватает?

[PHP] accept message object

Function track($message, $event_name = 'Message') only accept key - value array in $message parameter. It would be nice to let programmers pass object, which created by json_decode($json, false).
Why all should use non-default behaviour of json_decode?

statusCode error

I see this in my logs when i have a service pinging my apps to check they're alive.
perhaps there is no body in the request or something that is causing, looks like the error is deep in your code.

TypeError: Cannot read property 'statusCode' of undefined
    at Request._callback (/root/www/newtopic_bot/node_modules/botanio/botan.js:23:71)
    at self.callback (/root/www/newtopic_bot/node_modules/botanio/node_modules/request/request.js:354:22)
    at Request.emit (events.js:107:17)
    at Request.onRequestError (/root/www/newtopic_bot/node_modules/botanio/node_modules/request/request.js:1011:8)
    at ClientRequest.emit (events.js:107:17)
    at TLSSocket.socketOnEnd (_http_client.js:300:9)
    at TLSSocket.emit (events.js:129:20)
    at _stream_readable.js:908:16
    at process._tickDomainCallback (node.js:381:11)

Lack of PyPI package for Python

Rather than manually installing requests & downloading file it will be more convenient just to install botan as a package.

AppMetrica Api key is not secure

Было бы неплохо чтобы апи кей метрики был не тем же самым, что id, а какими-то уникальным хэшом.
Я понимаю, почему он такой для клиентских приложений на андроид и иос, но в случае с Телеграмом запросы делаются сервер-сервер, поэтому его можно сделать безопаснее, чтобы никто не нафлудил тебе в статистику случайно или со злым умыслом.

Bot doesn't accept new bots

When trying to add a new bot via @botaniobot, it always says:

Please choose a different name: it should start with "@", end with "bot" and it shouldn't exceed 32 symbol length limit; e.g. @BotanioBot) or press /cancel to exit

I've tried everything, it always responds with this message 😢

shorten url returning 504

Hi, while calling botan.shorten_url in python I get the following response:

<title>504 Gateway Time-out</title>

504 Gateway Time-out


nginx/1.9.9 did I make the request wrongly or something is down?

Relicense under dual MIT/Apache-2.0

This issue was automatically generated. Feel free to close without ceremony if
you do not agree with re-licensing or if it is not possible for other reasons.
Respond to @cmr with any questions or concerns, or pop over to
#rust-offtopic on IRC to discuss.

You're receiving this because someone (perhaps the project maintainer)
published a crates.io package with the license as "MIT" xor "Apache-2.0" and
the repository field pointing here.

TL;DR the Rust ecosystem is largely Apache-2.0. Being available under that
license is good for interoperation. The MIT license as an add-on can be nice
for GPLv2 projects to use your code.

Why?

The MIT license requires reproducing countless copies of the same copyright
header with different names in the copyright field, for every MIT library in
use. The Apache license does not have this drawback. However, this is not the
primary motivation for me creating these issues. The Apache license also has
protections from patent trolls and an explicit contribution licensing clause.
However, the Apache license is incompatible with GPLv2. This is why Rust is
dual-licensed as MIT/Apache (the "primary" license being Apache, MIT only for
GPLv2 compat), and doing so would be wise for this project. This also makes
this crate suitable for inclusion and unrestricted sharing in the Rust
standard distribution and other projects using dual MIT/Apache, such as my
personal ulterior motive, the Robigalia project.

Some ask, "Does this really apply to binary redistributions? Does MIT really
require reproducing the whole thing?" I'm not a lawyer, and I can't give legal
advice, but some Google Android apps include open source attributions using
this interpretation. Others also agree with
it
.
But, again, the copyright notice redistribution is not the primary motivation
for the dual-licensing. It's stronger protections to licensees and better
interoperation with the wider Rust ecosystem.

How?

To do this, get explicit approval from each contributor of copyrightable work
(as not all contributions qualify for copyright, due to not being a "creative
work", e.g. a typo fix) and then add the following to your README:

## License

Licensed under either of

 * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
 * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)

at your option.

### Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any
additional terms or conditions.

and in your license headers, if you have them, use the following boilerplate
(based on that used in Rust):

// Copyright 2016 sdk Developers
//
// Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or
// http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or
// http://opensource.org/licenses/MIT>, at your option. This file may not be
// copied, modified, or distributed except according to those terms.

It's commonly asked whether license headers are required. I'm not comfortable
making an official recommendation either way, but the Apache license
recommends it in their appendix on how to use the license.

Be sure to add the relevant LICENSE-{MIT,APACHE} files. You can copy these
from the Rust repo for a plain-text
version.

And don't forget to update the license metadata in your Cargo.toml to:

license = "MIT OR Apache-2.0"

I'll be going through projects which agree to be relicensed and have approval
by the necessary contributors and doing this changes, so feel free to leave
the heavy lifting to me!

Contributor checkoff

To agree to relicensing, comment with :

I license past and future contributions under the dual MIT/Apache-2.0 license, allowing licensees to chose either at their option.

Or, if you're a contributor, you can check the box in this repo next to your
name. My scripts will pick this exact phrase up and check your checkbox, but
I'll come through and manually review this issue later as well.

segment overlays?

is there a way in the dash to say compare, new vs returning users? or anyway to view more than one segment at once? (I guess this is not a botan specific Q)

wondering what are the good points about this dashboard compared to GA? slight ease of integration i guess - you take the message directly and map it to data points.

Install pip

"pip install botan" - not working
How install Botan SDK use pip?

Invalid response Content-Type

For every /track/ and /s/ request, server returns Content-Type: text/html or nothing but it's definitely application/json or text/plain for successful /s/ request.

Botan & Stats in Yandex AppMetrica

Hi,

how to pass additional parameters for events and show them in the Yandex AppMetrica UI?

I use Java SDK and see the 'message' parameter (of type Object) in 'botan.track' method. However, neither Map, nor JSON formatted String work for it as values.

How fast data will arrive to botan?

Hi, I am using ruby telegram-bot-api wrapper, and sending info to botan. I don't have any errors while invoking track method, but the problem is I can't see any data in my dashboard. Is there any delay?
p.s. I've waiter for ~10 minuts, and still there is no data.
Thank you.

explanation of API

you have "Start" as an example event. is this word meaningful or can we change that to be different tracking event names "signup", "game", "levelup" etc. ?

wondering how we can send more meaningful data to the API for tracking...

Почему то не отвечает botanio при работе с node.js

error: null
response.statusCode: 500
matchmaker-24 response.statusText: undefined
matchmaker-24 error: Error: connect ETIMEDOUT
matchmaker-24 uncaughtException: TypeError: Cannot read property 'statusCode' of undefined, TypeError: Cannot read property 'statusCode' of undefined
at Request._callback (/home/www/matchmaker/node_modules/botanio/botan.js:23:71)
at self.callback (/home/www/matchmaker/node_modules/botanio/node_modules/request/request.js:354:22)
at Request.emit (events.js:107:17)
at Request.onRequestError (/home/www/matchmaker/node_modules/botanio/node_modules/request/request.js:1011:8)
at ClientRequest.emit (events.js:107:17)
at TLSSocket.socketErrorListener (_http_client.js:271:9)
at TLSSocket.emit (events.js:129:20)
at net.js:459:14
at process._tickCallback (node.js:355:11)

"Connection refused" error

Update: Found out that problem is caused for those who use FirstVDS hosting.

This has started recently (on 28th or 29th of August 2016), Botan support bot doesn't reply at all.

I've started recieving such errors:

HTTPSConnectionPool(host='api.botan.io', port=443): Max retries exceeded with url: /track?token=TOKEN&name=NAME&uid=UID 
Caused by NewConnectionError('<requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7fa40406b438>: 
Failed to establish a new connection: [Errno 111] Connection refused',))

The strange thing is that if I execute GET query with that data manually (through my browser), it says "accepted".

Botan service disruption kills my bot

As I've discovered today Botan is returning status other than 'accepted' on my bot's requests which cause throw of an exception 'Error Processing Request'. This prevent my bot from responding to users queries which is too bad. So my bot's health depends of Botan service availability!

Inconsistent responses

For error response /track/ returns "status": "bad request" and additional info in info field, /s/ returns additional info in message field.

For success response /track/ returns "status": "accepted" and /s/ returns plain text response. I think it's better if /s/ could be more consistent, e.g. return json response.

Moreover as mentioned in documentation, status is the success indicator in /track/ request but in /s/ request it's just an HTTP response code.

504 Gateway Time-out on /track method

Can't send my stats, getting 504 error, probably related to #97 #93

Response:

<html>
<head><title>504 Gateway Time-out</title></head>
<body bgcolor="white">
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.9.9</center>
</body>
</html>

Call to undefined function curl_init()

Для php видимо надо указать, что есть завивсимость от php5-curl, если не установлен модуль, то выскакивает Call to undefined function curl_init() Botan.php on line 43

На ubuntu решается так:
sudo apt-get install php5-curl

TimeOut

Запускаю скрип бота на python с Ubuntu на своём компьютере, тогда всё работает и метрика отправляется на yandex где её можно посмотреть. А к когда запускаю скрип на debian на удалённом VDS то постоянно выдаётся ошибка TimeOut (False)


> def track(token, uid, message, name='Message'):
>     try:
>         r = requests.post(
>             TRACK_URL,
>             params={"token": token, "uid": uid, "name": name},
>             data=json.dumps(message),
>             headers={'Content-type': 'application/json'},
>         )
>         return r.json()
>     except requests.exceptions.Timeout:
>         # set up for a retry, or continue in a retry loop
>         return False      # Вот этот False

Что делать?

Проект ещё живой?

Появились вопросы, на которые нет ответа (#38). Есть даже идеи реализовать #13 Гео локацию, а последний коммит 22 дня назад + изменений в самой метрики не появлялось. Всё, забросили? 😢

Inconsistent requests

/track/ request requires POST method but /s/ request requires GET, as shown in #50 /s/ is a quite heavy request, I suggest to use POST method only.

Furthermore, since telegram support supergroups and maximum user id length is 10 bytes for now, there is user_ids query parameter's length up to 10999 bytes which is more than your nginx server support, so it's possible to get nginx 414 Request-URI Too Large response.

geography / device etc. tracking

does any of this work? does yandex have some back connection to telegraph servers to add meta data over the message IDs? I hope not :)

i see all my users coming from germany, even though my app server is in the US. how does that work exactly?

Обработка на стороне сервиса гео информации с ботов

Отправил человек геолокацию, было-бы очень неплохо, чтобы именно она учитывалась все в географии пользователей в аналитике, а не ип адрес где размещен бэкенд бота. Таким образом, можно было-бы строить аналитики и по странам городам

Which fields do botan need?

Hello, I'm using custom wrapper - pyTelegramBotAPI. It's really simple and cool, but it converts message's JSON to it's own class Message.

Which fields (e.g. chat_id, text, date, message_id...) are required for Botan's proper work?
I just don't want to do monkeypatching and convert Message object to JSON again.

[Python] Unable to fetch shortened link

.get() method in requests must pass params using the corresponding keyword (docs).

There will be error otherwise:

  File "/.../botan.py", line 37, in shorten_url
    'user_ids': str(user_id)
TypeError: get() takes 1 positional argument but 2 were given

Странные записи в Метрике

Здравствуйте.
Заметил сегодня, что в Метрике для всех моих ботов появились странные записи с какими-то хэшами, хотя, по идее, должны выводиться только записи для указанных команд в функции botan.track

Вот скриншот этого безобразия.
Во всех случаях такой мусор идет от юзера Test test c id 615946

Каждый такой хэш отмечается в статистике ровно один раз.

500 and status "accepted"

Long story short

Doc says:

API response is a json document:

on success: {"status": "accepted"}
on failure: {"status": "failed"} or {"status": "bad request", "info": "some_additional_info_about_error"}

And I try to do response without token param

Expected behaviour

Some error status. Like failed, bad request or smth else

Actual behaviour

on 500 status code I have

{"status" : "accepted"}

Steps to reproduce

http POST https://api.botan.io/track\?uid\=123\&name\=TEST \
        Content-type:application/json < msg.json

HTTP/1.1 500 Internal Server Error
Connection: keep-alive
Content-Length: 25
Date: Tue, 15 Nov 2016 13:13:54 GMT
Server: nginx/1.9.9

{ "status" : "accepted" }

1

Throated ****

All bots disappeared from @botaniobot

All my bots disappeared from @botaniobot, /import doesn't work. Is this an issues on your end?
I can see stats in Appmetrica.

Also, so much for "We can't respond immediately but we make sure we do reply to everyone!" in @botansupportbot, I still didn't get a reply for a question asked months ago.
That bot seem to not even reply to /start command.

Posting this here because I couldn't find any other place to post this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.