GoTGProto is a helper package for gotd library, It aims to make td’s raw functions easy-to-user with the help of features like using session strings, custom helper functions, storing peers and extracting chat or user ids through it etc.

You can use this package to create bots and userbots with Telegram MTProto easily in golang, for any futher help you can check out the documentations or reach us through the following:

  • Updates Channel: Channel
  • Support Chat: Chat

Go Reference GPLv3 license

Note: This library is in the beta stage yet and may not be stable for every case.


You can download the library with the help of standard go get command.

go get


You can find various examples in the examples’ directory, one of them i.e. authorizing as a user is as follows:

package main
import (
func main() {
    dp := dispatcher.MakeDispatcher()
		AppID: 1234567,
		ApiHash: "API_HASH_HERE",
		Session: sessionMaker.NewSession("session_name", sessionMaker.Session),
		Dispatcher: dp,
		TaskFunc: func(ctx context.Context, client *telegram.Client) error {
			return nil


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update examples as appropriate.



Licensed Under GNU General Public License v3


View Github