ETHON: Libcurl initialized
ETHON: performed EASY effective_url=https://api.hubapi.com/crm/v3/objects/contacts?hapikey= response_code=401 return_code=ok total_time=0.270575
Hubspot::Crm::Contacts::ApiError: Error message: the server returns an error
HTTP status code: 401
Response headers: {"date"=>"Mon, 21 Nov 2022 17:24:27 GMT", "content-type"=>"application/json;charset=utf-8", "content-length"=>"316", "cf-ray"=>"76db1e740ae9dc7f-LHR", "strict-transport-security"=>"max-age=31536000; includeSubDomains; preload", "vary"=>"origin", "cf-cache-status"=>"DYNAMIC", "access-control-allow-credentials"=>"false", "x-hubspot-auth-failure"=>"401 Unauthorized", "x-hubspot-correlation-id"=>"bc05f85b-9acb-4442-a9d0-935b4405f248", "x-trace"=>"2B8A74C5C256E7B07082895AD1108AB82F2B03E24A000000000000000000", "report-to"=>"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=Gd0CQL52fGuWLbhom7OhK4a2QJwVZQXc29IHJARBZ44RJcaBl%2FuF3%2FAG4RLI%2FC5LSz3fTl3zN%2BokUl%2BsOwpWO8nkRhQ9nuqRIkaFj1hM7AU64qvNBV90GaajkUr8vf1h\"}],\"group\":\"cf-nel\",\"max_age\":604800}", "nel"=>"{\"success_fraction\":0.01,\"report_to\":\"cf-nel\",\"max_age\":604800}", "server"=>"cloudflare", "alt-svc"=>"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400"}
Response body: {"status":"error","message":"Authentication credentials not found. This API supports both API Key and OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview","correlationId":"bc05f85b-9acb-4442-a9d0-935b4405f248","category":"INVALID_AUTHENTICATION"}
hubspot-api-ruby/lib/hubspot/codegen/crm/contacts/api/basic_api.rb
Line 291 in 11cb395
Should this line be
auth_names = opts[:debug_auth_names] || opt[:auth_names]?? I am getting the error below when I try to make any api calls but when I make the suggested change it works fine. I am trying to use oauth instead of api keys for auth.api call:
Hubspot::Client.new(access_token: 'token').crm.contacts.basic_api.get_pageresponse: