diff --git a/manifests.go b/manifests.go index 810bd4f6a..0041bf244 100644 --- a/manifests.go +++ b/manifests.go @@ -283,5 +283,5 @@ type ExportManifestResponse struct { type UpdateManifestResponse struct { AppId string `json:"app_id,omitempty"` PermissionsUpdated bool `json:"permissions_updated,omitempty"` - SlackResponse + ManifestResponse } diff --git a/tokens.go b/tokens.go index 5968704d7..4b83beebb 100644 --- a/tokens.go +++ b/tokens.go @@ -33,6 +33,12 @@ func (api *Client) RotateTokensContext(ctx context.Context, configToken string, return response, response.Err() } +// UpdateConfigTokens replaces the configuration tokens in the client with those returned by the API +func (api *Client) UpdateConfigTokens(response *TokenResponse) { + api.configToken = response.Token + api.configRefreshToken = response.RefreshToken +} + type TokenResponse struct { Token string `json:"token,omitempty"` RefreshToken string `json:"refresh_token,omitempty"`