i am using the newest version for the ruby client: Versin 16.0.1.
Then i run the follwoing code:
client = Hubspot::Client.new(access_token: 'PRIVATE APP TOKEN')
body = { properties: { name: 'DeathStar GmbH' }}
response = client.crm.companies.basic_api.create(body: body)
# This is the response:
ETHON: Libcurl initialized
ETHON: performed EASY effective_url=https://api.hubapi.com/crm/v3/objects/companies?hapikey= response_code=401 return_code=ok total_time=0.344603
Hubspot::Crm::Companies::ApiError: Error message: the server returns an error
HTTP status code: 401
So my question is: Why is there still `hapikey=` at the end of the url and is that a problem? I followed the DOCs of the API. Accounts Dashboard | HubSpot
thanks for the hint. The main problem is that the hubspot-api-client gem is not supporting Private Apps, which is preffered from Hubspot. So i started writing my own gem: