Skip to content

How to use our API to get servicedesk/customer infos? #1541

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
tuduweb opened this issue May 15, 2025 · 3 comments
Open

How to use our API to get servicedesk/customer infos? #1541

tuduweb opened this issue May 15, 2025 · 3 comments

Comments

@tuduweb
Copy link

tuduweb commented May 15, 2025

how to use atlassian-python-api to get servicedesk/customer infos?
It's that avaliable?

            service_desk = ServiceDesk(
                url=self.server,
                username=self.username,
                password=self.password,
                cloud=True  # Set to False if using Jira Server/Data Center
                # cookies=cookie_dict
            )

           service_desks_info = service_desk.get_service_desks()

but return 401 Client Error: Unauthorized for url: xxx

the server is: https://xxx.atlassian.net

@dunterov
Copy link
Contributor

@tuduweb hello! The code snippet you provided seems correct.
The problem most probably is that the feature https://www.atlassian.com/software/jira/service-management/features/service-desk is not enabled for your account.

Just tested it. Before

requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://<my_project_here>.atlassian.net/rest/servicedeskapi/servicedesk

After

[{'id': '1', 'projectId': '10002', 'projectName': 'Support', 'projectKey': 'SUP', '_links': {'self': 'https://<my_project_here>.atlassian.net/rest/servicedeskapi/servicedesk/1'}}]

@dunterov
Copy link
Contributor

However you mentioned 401. Please check if credentials and url you use are correct.

@tuduweb
Copy link
Author

tuduweb commented May 17, 2025

I re-confirm the credentials and url, that's correct.
I guess it's because my account is a customer's account? will this have an impact and cause this issues?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants