backend/app/zeus/service/lark/internal/lark/user.go

15 lines
373 B
Go

package lark
import (
"context"
"github.com/larksuite/oapi-sdk-go/core"
authen "github.com/larksuite/oapi-sdk-go/service/authen/v1"
)
func (l Lark) Auth(code string) (*authen.UserAccessTokenInfo, error) {
return l.userService.Authens.AccessToken(core.WrapContext(context.Background()), &authen.AuthenAccessTokenReqBody{
GrantType: "",
Code: code,
}).Do()
}