2

I am trying to authenticate to messagebird using a custom function of zoho CRM. I am trying the following script:

//HEADER

API_Key = "***"; I am hiding the API Key
HeaderMap = Map();
HeaderMap.put("Content-Type","application/json");
HeaderMap.put("Authorization","Access Key " + API_Key);
ENDPOINT = "https://conversations.messagebird.com/v1/send";
Request = invokeurl
[
    url :ENDPOINT
    type :POST
    headers:HeaderMap
];

I am getting this error:

{"errors":[{"code":2,"description":"Request was not authenticated"}]}

and i am passing this json:

{"Content-Type":"application/json","Authorization":"Access Key ***"}

Does any one if i am doing something wrong?

2 Answers2

4

AccessKey should be in one word

HeaderMap.put("Authorization","AccessKey" + API_Key);

Extract from my FlowBuilder example: enter image description here

Ando
  • 11,199
  • 2
  • 30
  • 46
1

worth noting that the webhook related APIs only work with LIVE API keys. I didn't see any mention of that anywhere in the docs, but it only worked for me after trying with a live key... I hope this will save someone some time!

justabuzz
  • 842
  • 1
  • 9
  • 19