Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,458,373
Community Members
 
Community Events
176
Community Groups

API Key is not granted with configuration access

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.

1 answer

0 votes
Nick H Atlassian Team Oct 20, 2020

Hi @Taweewat Phonksawai 

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

 

commschedapi.png

 

Below is the request for both Postman and Terminal:

 

commschedapi2.pngcommschedapi3.png

 

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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS

Atlassian Community Events