channel_access_token

package
v8.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelAccessTokenAPI

type ChannelAccessTokenAPI struct {
	// contains filtered or unexported fields
}

func NewChannelAccessTokenAPI

func NewChannelAccessTokenAPI(options ...ChannelAccessTokenAPIOption) (*ChannelAccessTokenAPI, error)

New returns a new bot client instance.

func (*ChannelAccessTokenAPI) Do

func (client *ChannelAccessTokenAPI) Do(req *http.Request) (*http.Response, error)

func (*ChannelAccessTokenAPI) IssueChannelTokenByJWT

func (client *ChannelAccessTokenAPI) IssueChannelTokenByJWT(

	grantType string,

	clientAssertionType string,

	clientAssertion string,

) (*IssueChannelAccessTokenResponse, error)

https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1

func (*ChannelAccessTokenAPI) IssueChannelTokenByJWTWithHttpInfo

func (client *ChannelAccessTokenAPI) IssueChannelTokenByJWTWithHttpInfo(

	grantType string,

	clientAssertionType string,

	clientAssertion string,

) (*http.Response, *IssueChannelAccessTokenResponse, error)

https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1

func (*ChannelAccessTokenAPI) IssueStatelessChannelToken

func (client *ChannelAccessTokenAPI) IssueStatelessChannelToken(

	grantType string,

	clientAssertionType string,

	clientAssertion string,

	clientId string,

	clientSecret string,

) (*IssueStatelessChannelAccessTokenResponse, error)

https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token

func (*ChannelAccessTokenAPI) IssueStatelessChannelTokenWithHttpInfo

func (client *ChannelAccessTokenAPI) IssueStatelessChannelTokenWithHttpInfo(

	grantType string,

	clientAssertionType string,

	clientAssertion string,

	clientId string,

	clientSecret string,

) (*http.Response, *IssueStatelessChannelAccessTokenResponse, error)

https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token

func (*ChannelAccessTokenAPI) RevokeChannelTokenByJWT

func (client *ChannelAccessTokenAPI) RevokeChannelTokenByJWT(

	clientId string,

	clientSecret string,

	accessToken string,

) (struct{}, error)

https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token-v2-1

func (*ChannelAccessTokenAPI) RevokeChannelTokenByJWTWithHttpInfo

func (client *ChannelAccessTokenAPI) RevokeChannelTokenByJWTWithHttpInfo(

	clientId string,

	clientSecret string,

	accessToken string,

) (*http.Response, struct{}, error)

https://developers.line.biz/en/reference/messaging-api/#revoke-channel-access-token-v2-1

func (*ChannelAccessTokenAPI) Url

func (client *ChannelAccessTokenAPI) Url(endpointPath string) string

func (*ChannelAccessTokenAPI) WithContext

WithContext method

type ChannelAccessTokenAPIOption

type ChannelAccessTokenAPIOption func(*ChannelAccessTokenAPI) error

ChannelAccessTokenAPIOption type

func WithEndpoint

func WithEndpoint(endpoint string) ChannelAccessTokenAPIOption

WithEndpointClient function

func WithHTTPClient

func WithHTTPClient(c *http.Client) ChannelAccessTokenAPIOption

WithHTTPClient function

type ChannelAccessTokenKeyIdsResponse

type ChannelAccessTokenKeyIdsResponse struct {

	/**
	 * Array of channel access token key IDs. (Required)
	 */
	Kids []string `json:"kids"`
}

ChannelAccessTokenKeyIdsResponse Channel access token key IDs https://developers.line.biz/en/reference/messaging-api/#get-all-valid-channel-access-token-key-ids-v2-1

type ErrorResponse

type ErrorResponse struct {

	/**
	 * Error summary
	 */
	Error string `json:"error,omitempty"`

	/**
	 * Details of the error. Not returned in certain situations.
	 */
	ErrorDescription string `json:"error_description,omitempty"`
}

type IssueChannelAccessTokenResponse

type IssueChannelAccessTokenResponse struct {

	/**
	 * Channel access token.  (Required)
	 */
	AccessToken string `json:"access_token"`

	/**
	 * Amount of time in seconds from issue to expiration of the channel access token (Required)
	 */
	ExpiresIn int32 `json:"expires_in"`

	/**
	 * A token type. (Required)
	 */
	TokenType string `json:"token_type"`

	/**
	 * Unique key ID for identifying the channel access token. (Required)
	 */
	KeyId string `json:"key_id"`
}

IssueChannelAccessTokenResponse Issued channel access token https://developers.line.biz/en/reference/messaging-api/#issue-channel-access-token-v2-1

type IssueShortLivedChannelAccessTokenResponse

type IssueShortLivedChannelAccessTokenResponse struct {

	/**
	 * A short-lived channel access token. Valid for 30 days. Note: Channel access tokens cannot be refreshed.  (Required)
	 */
	AccessToken string `json:"access_token"`

	/**
	 * Time until channel access token expires in seconds from time the token is issued. (Required)
	 */
	ExpiresIn int32 `json:"expires_in"`

	/**
	 * Token type. The value is always `Bearer`. (Required)
	 */
	TokenType string `json:"token_type"`
}

IssueShortLivedChannelAccessTokenResponse Issued short-lived channel access token https://developers.line.biz/en/reference/messaging-api/#issue-shortlived-channel-access-token

type IssueStatelessChannelAccessTokenResponse

type IssueStatelessChannelAccessTokenResponse struct {

	/**
	 * A stateless channel access token. The token is an opaque string which means its format is an implementation detail and the consumer of this token should never try to use the data parsed from the token.  (Required)
	 */
	AccessToken string `json:"access_token"`

	/**
	 * Duration in seconds after which the issued access token expires (Required)
	 */
	ExpiresIn int32 `json:"expires_in"`

	/**
	 * Token type. The value is always `Bearer`. (Required)
	 */
	TokenType string `json:"token_type"`
}

IssueStatelessChannelAccessTokenResponse Issued stateless channel access token https://developers.line.biz/en/reference/messaging-api/#issue-stateless-channel-access-token

type VerifyChannelAccessTokenResponse

type VerifyChannelAccessTokenResponse struct {

	/**
	 * The channel ID for which the channel access token was issued. (Required)
	 */
	ClientId string `json:"client_id"`

	/**
	 * Number of seconds before the channel access token expires. (Required)
	 */
	ExpiresIn int64 `json:"expires_in"`

	/**
	 * Permissions granted to the channel access token.
	 */
	Scope string `json:"scope,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL