Making Post Request To HubSpot Api
Hi there I'm trying to make a post request to the HubSpot Api. However the request results in a "HubSpot API responded with status: 401" ´401 Unauthorized is returned when the authentication provided is invalid.´
https://developers.hubspot.com/docs/api/crm/contacts
Selected scopes on the HubSpot app:
crm.objects.companies.read
crm.objects.contacts.read
crm.objects.contacts.write
crm.objects.companies.write
All help is super appreciative! Thank you in advance!
CRM API | Contacts
Contact records store information about individuals. The contacts endpoints allow you to manage this data and sync it between HubSpot and other systems.
2 Replies
Looks like your HUBSPOT_ACCESS_TOKEN is not valid. If you console.log it before your fetch, is the value what you expect? Also, if it's an environment variable, are you referencing it correctly? E.g.
Deno.env.get(HUBSPOT_ACCESS_TOKEN)
perhaps?I did a log on it now. it is null hehe
thank you!