I was getting an invalid value for the key. My bad! Please ignore this!
I'm trying to create an alert using the Java SDK. I've followed the guide for setting the API key, trying all sorts of permutations:
OpsGenieClient client = new OpsGenieClient();
...
client.setApiKey(myKey);
or
client.setApiKey(base64Encode(myKey));
or
client.setApiKey(base64UrlEncode(myKey));
or using
alertApi = client.alertV2();
...
alertApi.getApiClient().setApiKey(myKey);
or the same variations as above passing the base 64 encoded or base 64 URL encoded key to alertApi.getApiClient().setApiKey(...);
No matter what I try, I always get the same result:
com.ifountain.opsgenie.client.swagger.ApiException:
{
"message": "Key format is not valid!",
"took": 0.001,
"requestId": "7ef9d057-8b49-4264-ad70-e79a14a3e1cb"
}
What am I doing wrong??