API Post to GoHighLevel
# 🤝help
a
Im trying to create code that will post a new contact to GoHighLevel using their API BotPress created the following code const contact = { "name": workflow.username, "email": workflow.emailaddress, "phone": workflow.phonenum, } const apiKey = env.GHLAPI const url = 'https://api.gohighlevel.com/v1/contacts' const headers = { 'Content-Type': 'application/json', 'Authorization':
Bearer ${apiKey}
} const response = await axios.post(url, contact, { headers }) console.log('New contact created:', response.data) I am getting error message as attachment Any ideas as to what i might be doing wrong?

https://cdn.discordapp.com/attachments/1134113018725285948/1134113018880479313/image.png

l
are you able to post to this api from outside of botpress?
a
Yes. Have done from LeadsHook and via Zapier. Wanted to avoid Zapier if i can
Any ideas on this?
14 Views