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?