Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how use /rest/api/2/agile/1.0/board? for scoped api token, tell me each step

AdnanFakhar Training Material
October 24, 2025

i am using in this way

url = f"https://api.atlassian.com/ex/jira/{cloud_id}/rest/api/2/agile/1.0/board?projectKeyOrId=BUN"

auth1 = HTTPBasicAuth(JIRA_EMAIL, api_token)
headers1 = {"Accept": "application/json"}

r = requests.get(url, headers=headers1, auth=auth1)
print(r.status_code)
print("Jira Json Response --->>> ", r.text)


these are the scopes I added

Read

read:sprint:jira-software
read:issue-details:jira
read:jql:jira
read:jira-work
read:jira-user
read:board-scope:jira-software

Manage

manage:jira-project
manage:jira-configuration

Write

write:jira-work
write:sprint:jira-software
Close


I got this response

401
Jira Json Response --->>> {"code":401,"message":"Unauthorized; scope does not match"}

3 answers

1 accepted

0 votes
Answer accepted
Marc -Devoteam-
Community Champion
October 24, 2025

Hi @AdnanFakhar Training Material 

The Software API has no granular scopes, so you can't use a scoped API token with the software API endpoint.

AdnanFakhar Training Material
October 28, 2025

Hi Marc

What does it mean that Software API has no granular scopes?
You mean with Scoped API cannot get board/sprint info via api.

Marc -Devoteam-
Community Champion
October 28, 2025

Hi @AdnanFakhar Training Material 

Yes, that's exactly what I mean.

You can also see that at the API endpoints that no Granular options are available.

Like Gor Greyan likes this
Gerardo Saca
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 6, 2026

@Marc -Devoteam- is that still true?

Trying to reconcile what you're saying with this documentation page:

https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-group-board

Which mentions the 2 granular scopes in the context of OAuth2 Apps: 

  • read:board-scope:jira-software, read:project:jira
Marc -Devoteam-
Community Champion
March 9, 2026

Hi @Gerardo Saca 

This is still the case.

If a service account can be used, there is an option named "Granular", just as you can see in the API scopes of the Jira Cloud API.

Gerardo Saca
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 9, 2026

Sorry, I'm still a little confused.

 

Ultimately, I just want to know if it's possible to have an OAuth2 App that can query GET /rest/agile/1.0/board

Based on this documentation, I should be able to as long as I grant the app these 3 permissions:

  • read:board-scope:jira-software, read:project:jira

Right? Or is the documentation wrong and what I'm trying to do is not possible?

 

Thanks for the help!

Marc -Devoteam-
Community Champion
March 9, 2026

Hi @Gerardo Saca 

Yes you can, but you can't use a service account in Jira for this.

But on using oAuth, you first need to authorise with the token, to get the oAuth reply token, that token needs to be used in the call to get the board infroation.

https://developer.atlassian.com/cloud/jira/software/scopes-for-oauth-2-3LO-and-forge-apps/ 

0 votes
Deleted user
October 24, 2025

Hello @AdnanFakhar Training Material 

First, the documentation for the Get all boards endpoint says that it requires two OAuth 2.0 scopes:

  1. read:board-scope:jira-software and
  2. read:project:jira

But according to the information you have provided, you didn't add the second scope to your OAuth scoped API token. Is there a reason why you did that??

Second, you said you are using an OAuth scoped token, but the code you've provided shows that you are trying to make a connection using Basic auth and submitting an email address + API token instead of a Bearer token. Is there a reason why you're doing that??

AdnanFakhar Training Material
October 27, 2025

Hi Andrew

I tried it with the scope you asked..but not work says " Jira Json Response --->>> {"code":401,"message":"Unauthorized; scope does not match"} "

can you code me , how i achieve it, although I get 
all user info using scoped by this code




url = f"https://api.atlassian.com/ex/jira/{cloud_id}/rest/api/2/users/search?startAt=0&maxResults=1000"


auth = HTTPBasicAuth(JIRA_EMAIL, api_token)
headers = {"Accept": "application/json"}



# Make the GET request
response = requests.get(url, headers=headers, auth=auth)
print(response.text)



I have these permissions:

28466929-0886-4d6e-9153-11d90900e03c.jpeg

 

0 votes
Gor Greyan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 24, 2025

Hi @AdnanFakhar Training Material

  • Firstly, change the URL host and path
    Use your Jira site, not the Atlassian gateway, and the Agile API path:
    https://<your-site>.atlassian.net/rest/agile/1.0/board?projectKeyOrId=BUN.
    https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/?utm_source=chatgpt.com

  • Keep Basic Auth (email + API token)
    Basic auth is valid for simple scripts against your site domain.

  • And try the following Python script

    import requests
    from requests.auth import HTTPBasicAuth

    SITE = "your-site.atlassian.net"
    url = f"https://{SITE}/rest/agile/1.0/board?projectKeyOrId=BUN"

    auth = HTTPBasicAuth(JIRA_EMAIL, API_TOKEN) # same token you already have
    headers = {"Accept": "application/json"}

    r = requests.get(url, headers=headers, auth=auth, timeout=30)
    print(r.status_code)
    print(r.text)

 

AdnanFakhar Training Material
October 27, 2025

Hi Gor Greyan

the code which you gave me is " without scoped " api

I want to use it with scoped api to get board data.

can you code me what steps i need to get it

Gor Greyan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Champions.
October 28, 2025

Suggest an answer

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

Atlassian Community Events