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

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


1 badge earned


Participate in fun challenges

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


Gift kudos to your peers

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


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!


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
Community Members
Community Events
Community Groups

Compass GraphQL Access From OAuth Application

I am looking to automate the creation and updating of our Compass components through GraphQL from an external application.  From what I can tell there is no way to provide access to the right OAuth scopes to a traditional OAuth application and it must happen through a Forge app. Is that correct?

The workaround I can come up with is create a Forge app with a web hook that accepts the payload I have created and then turns it into the right GraphQL queries, but that seems like an extra step that shouldn't have to exist.

1 answer

1 accepted

2 votes
Answer accepted
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 03, 2023

Hi Dan, You should be able to make requests to the compass GraphQL API from anywhere using Basic HTTP authentication with an API token. Compass API doesn't support OAuth yet.

You basically need to send an Authorization header that looks like Basic <value> where value is a base64 encoded string of <your-email>:<your-api-token>

You can generate an API token at

I have tried that, but I get a 403 back when using Basic HTTP auth.


      "message": "The underlying service call failed. The underlying service compass status code is : 403",
I am able to use the same header to query Jira, so I don't think I've made any typos, and I can run the same query successfully through the web explorer. Is there something I'm missing?
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 03, 2023

Hi Dan, Could you share the code snippet you are trying to execute?

We may be missing something somewhere. Here is an example node.js (v12) snippet I was able to run and get result from compass GraphQL API


import fetch from "node-fetch";

const getComponentQuery = `
query getComponent($componentId: ID!) {
compass {
component(id: $componentId) {
... on CompassComponent {
... on QueryError {

const makeRequest = async (query, variables) => {
let token = Buffer.from(
).toString("base64"); // replace my-email and my-token with your email and token

const response = await fetch("", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-ExperimentalApi": "compass-beta, compass-prototype",
Authorization: `Basic ${token}`,
body: JSON.stringify({
return response.json();

// this should be a component ARI which you can get by clicking the ... on a component overview page and clicking Copy Component ID
makeRequest(getComponentQuery, {componentId: '<a-component-ari>'}).then((response) => {



I am not in code yet. I'm just building my queries with Banana Cake Pop. I made sure to set the auth header and the experimental API header.


I've been running the following queries:

This one returns a 403:

query listComponents($cloudId: String!) {
  compass {
    searchComponents(cloudId: $cloudId)
      ... on CompassSearchComponentConnection {
        nodes {
          component {


This one works:

query jiraExample ($cloudId: ID!) {
  jira {
    allJiraProjects(cloudId: $cloudId, filter: {types: [SOFTWARE]}) {
      pageInfo {
      edges {
        node {


Update: I copied my same headers and queries into Postman, and it works in there...I'm not sure why Banana Cake Pop is getting a 403, but it seems likely that my tool is just sending up something that the GraphQL Endpoint doesn't like.

Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Feb 03, 2023

Not really super familiar with Banana Cake Pop, so can't tell whats up there but glad it worked finally! 

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events