zorg/createtoken/gettoken.go

24 lines
480 B
Go

package main
import (
"context"
"fmt"
"log"
"github.com/mattn/go-mastodon"
)
func main() {
app, err := mastodon.RegisterApp(context.Background(), &mastodon.AppConfig{
Server: "https://boseburo.ddns.net",
ClientName: "zorg",
Scopes: "read write follow",
Website: "https://git.keinpfusch.net/loweel/zorg.git",
})
if err != nil {
log.Fatal(err)
}
fmt.Printf("client-id : %s\n", app.ClientID)
fmt.Printf("client-secret: %s\n", app.ClientSecret)
}