module Cotoha::Endpoint::AccessToken

Public Instance Methods

create_access_token(**params) click to toggle source
# File lib/cotoha/endpoint/access_token.rb, line 4
def create_access_token(**params)
  params = {grantType: 'client_credentials', clientId: @client_id, clientSecret: @client_secret}.merge(params)
  response = post('/v1/oauth/accesstokens', **params)
  response.tap do |res|
    @token = res['access_token']
  end
end