How to use our API to get servicedesk/customer infos?
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
@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'}}]
However you mentioned 401. Please check if credentials and url you use are correct.
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?