I've created APIs integration to GET Who is on call via cURL
But every time I've tried to cURL to https://api.opsgenie.com/v2/schedules I've received an error below
{"code":40301,"message":"API Key is not granted with configuration access.","took":0.001,"requestId":"18faca16-b73f-4c90-aba0-9f35c43a64f2"}
Command
---curl -X GET 'https://api.opsgenie.com/v2/schedules' -H 'Authorization: GenieKey MYAPISKEY'
API Settings
---
Read Access ✅
Enable ✅
Checked / Tried
---
1. The API key used is newly created. Can be found under Teams => Integrations, on the Opsgenie web page.
2. Can get the list and details of existing alerts through Alert APIs using the same API Key. The existing alerts are created through the Opsgenie web page.
3. Try giving access to Read, Write, Delete, Restrict configuration
4. Tried changing the path to https://api.eu.opsgenie.com in case I am using EU instance. It returns "Could not authenticate" so I don't think I am using the EU instance.
For anyone who is experiencing the "API Key is not granted with write access." error message for (Promtheus type) integrations. I think this is the same issue as addressed here: https://github.com/atlassian/terraform-provider-atlassian-operations/issues/11
The issue is about the Atlassian Operations Terraform provider but this is not provider-specific. I ran into the same issue when using the Atlassian API directly to create a new integration (https://developer.atlassian.com/cloud/jira/service-desk-ops/rest/v2/api-group-integrations/#api-v1-integrations-post).
The solution is - when creating a new integration via the API - set the correct type-specific properties:
```
Hope this helps.
I opened a JIRA Support ticket and that was the provided solution.
Thank you for sharing.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
A team's API Integration / API Key should be enough to pull the team's schedules using that request. This is the configuration I have with my team's API Integration: https://docs.opsgenie.com/docs/schedule-api#list-schedules
Below is the request for both Postman and Terminal:
Try this curl command:
curl -X GET 'https://api.opsgenie.com/v2/schedules' --header 'Authorization: YOUR_API_KEY'
and let us know how it goes.
Also - your account's URL will let you know if you need a US or EU URL.
accountname.app.opsgenie.com = US >> https://api.opsgenie.com/v2/schedules
accountname.app.eu.opsgenie.com = EU >> https://api.eu.opsgenie.com/v2/schedules
-Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have similar issue
curl -XGET 'https://api.opsgenie.com/v2/schedules' -H 'Authorization: GenieKey **************'
respond
{"code":40301,"message":"API Key is not granted with configuration access.","took":0.0,"requestId":"55101c66-4f29-421c-ad92-b9b4390c3df7"}
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.
I have a weird situation where creating one alarm in one integration is working fine. But on the other integration I am testing it is returning a "API Key is not granted with write access."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same issue here. Was anybody able to resolve this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am experiencing the same issue with newly created JIRA Prometheus Integrations.
Did Jira change the default opsgenie_configs settings, url or other variables?
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.