How can I make a get request to a repository if my user hasn't generated a personal token and I have just the access token from authentication with oauth2? I have tried some options with postman but I can't fix it. I want to access a private repository
What I'm trying to do:
require "uri"
require "net/http"
url = URI("https://api.github.com/repos/username/repository_name")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = "Bearer ACCESS_TOKEN"
request["Cookie"] = "_octo=GH1.1.1832634711.1663350372; logged_in=no"
response = https.request(request)
puts response.read_body