You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
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??
Hi @Sam Peretz ,
Are you still having issues with this? This section details the 2 different ways you can set-up the apiKey. You will want to get an api Key from an API integration in Opsgenie.
Let us know if you're still running into issues!
Thanks,
Samir
Thanks @Samir, I'm all set. As mentioned in my update to the question (at the topic), I was just doing something dumb -- I was getting the API key from AWS SSM Parameter Store and wasn't setting the decryption option correctly, so I was using the encrypted value I was getting back from that call, which of course was not a valid API key! :O It's working great now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.