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

"Team API Keys not authorized to perform this action." for User API

lucas tomasini January 27, 2022

Hi,

I am getting error "Team API Keys are not authorized to perform this action." when trying to fetch user information from my team (https://api.opsgenie.com/v2/users/). I am admin of the team, but I guess I will need a global API Key maybe? How can I get one? I need to fetch the full name of the team's members.

Thanks!

1 answer

1 accepted

1 vote
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 28, 2022

Hi @lucas tomasini ,

That's correct - Team API keys are restricted to the User API - so you would need a Global API key.

Global API keys can be from a global API integration - meaning No Team is assigned to the integration, or from the Settings >> API Key Management tab.

If you do not have access to global integrations (found under the Settings >> Configured Integrations tab), or the API Key Management tab, then your role is restricted to these permissions.

You'd want to connect with either an account Admin or Owner to shared an API key with you.

lucas tomasini January 30, 2022

Thanks @Nick H !

Daniel Esguerra November 14, 2022

If we don't have access to a Global key, how can we set recipients/users in the escalation or schedules if we don't have their id.

I wanted to do something like

 

    recipient {
      type = "user"
      id   = data.opsgenie_user.johnsmith.id
    }
I understand that we can get all the ids of the users from 
data "opsgenie_team" "team" {
  name = "Team"
}
but how do we know where to set the ids in escalation and schedule if we don't have the names of the users in the member block?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events