Module: ChatWork::Token

Defined in:
lib/chatwork/token.rb

Class Method Summary collapse

Class Method Details

.refresh_access_token(refresh_token, scope = []) ⇒ Hash

refresh access_token with refresh_token

Examples:

response

{
  "access_token" => "new_access_token",
  "token_type" => "Bearer",
  "expires_in" => "1800",
  "refresh_token" => "refresh_token",
  "scope" => "users.all:read rooms.all:read_write contacts.all:read_write",
}

Parameters:

  • refresh_token (String)
  • scope (Array<String>) (defaults to: [])

Returns:

  • (Hash)


17
18
19
# File 'lib/chatwork/token.rb', line 17

def self.refresh_access_token(refresh_token, scope = [])
  ChatWork.oauth_client.refresh_access_token(refresh_token, scope)
end