REST API without user Authorization

I’m using REST API
And looking for the simple authorization way

namespace :token do
  desc 'generate access token'
  task :generate_access_token do
    require 'faraday'
    require 'uri'

    data = {
      application: ENV['INFUSIONSOFT_API_URL'],
      scope: 'full',
      client_id: ENV['INFUSIONSOFT_CLIENT_ID'],
      client_secret: ENV['INFUSIONSOFT_CLIENT_SECRET'],
    }
    authorization_string = "#{ENV['INFUSIONSOFT_CLIENT_ID']}:#{ENV['INFUSIONSOFT_CLIENT_SECRET']}"
    url = "https://accounts.infusionsoft.com/app/oauth/userToken"
  
    response = Faraday.post(url) do |req|
      req.headers['Authorization'] = "Basic #{Base64.strict_encode64(authorization_string)}"
      req.headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8'
      req.body = URI.encode_www_form(data)
    end
    response_body = JSON.parse(response.body)
    ...

  end
end

It works in case I add Cookie to reqest Header

req.headers['Cookie'] = "SESSION=YWU3ZjExMDgtNjliNS00ZGEyLWFmMmEtMWU5ODEwODM4ODFi"

But session expiring soon and its inconvenient
Is there the simple way without Authorization to proceed REST API implementation?

My contacts shouldn’t Authorize I just need to apply the tags actions to my contacts that using my App and already Authorized there

I have found this link but its not clear Making OAuth Requests Without User Authorization - Keap Developer Portal

Please advise

SOLUTION is HERE
Hope it helps somebody

namespace :token do
  desc 'update access token'
  task :update_access_token do
    require 'faraday'
    require 'uri'

    refresh_token = Tokens.find_by(key: :keap_refresh_token)[:value];

    data = {
      client_id: ENV['INFUSIONSOFT_API_KEY'],
      client_secret: ENV['INFUSIONSOFT_API_SECRET'],
      grant_type: "refresh_token",
      refresh_token: refresh_token
    }

    authorization_string = "#{ENV['INFUSIONSOFT_CLIENT_ID']}:#{ENV['INFUSIONSOFT_CLIENT_SECRET']}"
    url = "#{ENV['INFUSIONSOFT_API_HOST']}/token"

    response = Faraday.post(url) do |req|
      req.headers['Content-Type'] = 'application/x-www-form-urlencoded'
      req.headers['Authorization'] = "Basic #{Base64.strict_encode64(authorization_string)}"
      req.body = URI.encode_www_form(data)
    end
    response_body = JSON.parse(response.body)

    Tokens.find_by(key: :keap_token).update(value: response_body["access_token"])
    Tokens.find_by(key: :keap_refresh_token).update(value: response_body["refresh_token"])
  end
end