Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithHTTPClient ¶
Types ¶
type TokenInfo ¶
type TokenInfo struct { AccessToken string `json:"access_token"` TokenType string `json:"token_type"` ExpiresIn int64 `json:"expires_in"` // トークンが有効な CreatedAt からの秒数 RefreshToken string `json:"refresh_token"` Scope string `json:"scope"` CreatedAt int64 `json:"created_at"` // トークンが作成された Unix 秒 CompanyID int `json:"company_id"` }
func GetAccessToken ¶
func GetAccessToken(clientID string, clientSecret string, redirectURI string, authorizeCode string, opts ...OptFunc) (*TokenInfo, error)
GetAccessToken は認可コードを使用して freee の API アクセスに必要なトークン情報を取得します。
func RefreshAccessToken ¶
func RefreshAccessToken(clientID string, clientSecret string, refreshToken string, opts ...OptFunc) (*TokenInfo, error)
RefreshAccessToken はリフレッシュトークンを使用して freee の API アクセスに必要なトークン情報を取得します。
Click to show internal directories.
Click to hide internal directories.