Module: ChatWork::Token
- Defined in:
- lib/chatwork/token.rb
Class Method Summary collapse
-
.refresh_access_token(refresh_token, scope = []) ⇒ Hash
refresh access_token with refresh_token.
Class Method Details
.refresh_access_token(refresh_token, scope = []) ⇒ Hash
refresh access_token with refresh_token
17 18 19 20 21 22 23 24 25 |
# File 'lib/chatwork/token.rb', line 17 def self.refresh_access_token(refresh_token, scope = []) params = { grant_type: "refresh_token", refresh_token: refresh_token, } params[:scope] = scope.join(" ") unless scope.empty? ChatWork.oauth_client.post("/token", params) end |