How to authenticate with a service account and then a curl request. I have the following error message {"error": "Failed to parse Connect Session Auth Token" when I did
export JIRA_API_TOKEN="token jira"
export JIRA_SITE="xxxxx.atlassian.net"
export PROJECT_KEY="XXXXID"
curl --request GET \
--url "https://${JIRA_SITE}/rest/api/3/project/${PROJECT_KEY}" \
--header "Authorization: Bearer ${JIRA_API_TOKEN}" \
--header "Accept: application/json"
Hi @kevin defoi
Welcome to the community.
What call are you making, and are you on cloud or DC?
What if you use an basic authentication?
https://developer.atlassian.com/cloud/jira/platform/basic-auth-for-rest-apis/
Hi @Marc - Devoteam I'm on DC
When I enter this command
curl -D- \
-u myuser-service account@serviceaccount.atlassian.com:api_token \
-X GET \
-H "Content-Type: application/json" \
https://mydomain.atlassian.net/rest/api/2/issue/createmeta
I have this response
HTTP/2 200
content-type: application/json;charset=UTF-8
date: Tue, 02 Sep 2025 11:54:13 GMT
server: AtlassianEdge
timing-allow-origin: *
x-arequestid: d3125c7d19688fab1028a6c6fc6e8832
x-seraph-loginreason: AUTHENTICATED_FAILED
set-cookie: atlassian.xsrf.token=cxxxxxxxxxxxxxxxxxxxxxxaad3b_lout; Path=/; SameSite=None; Secure
cache-control: no-cache, no-store, no-transform
warning: The issue create meta endpoint has been deprecated. (Deprecation start date: June 03, 2024)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @kevin defoi
You are not clear, you mention you are on DE, but the API endpoint you provide is from the Cloud API
And also the service account option doesn't exist on DC., this is a Cloud only option.
So it seems you are on Cloud.
As the endpoint you are trying to use is deprecated, its place we are introducing two endpoints:
Get create metadata issue types for a project: fetches all Issue Types for a specific Project; it will support pagination on the Issue Types, but not include expanded fields.
Get create field metadata for a project and issue type id: fetches a specific Issue Type for a specific Project via issueTypeId. This endpoint will have expanded fields by default and will support pagination on the Fields.
The above is shared here; https://developer.atlassian.com/cloud/jira/platform/changelog/#CHANGE-1304 (2023)
The endpoint you specify can't be used since 03-06-2024, you need to use one of the replacement API calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also Service Accounts can't execute towards all API endpoints yet.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Also Service Accounts can't execute towards all API endpoints yet.
@Marc - Devoteam - do you know which API endpoints CAN be executed by Service Accounts? is this listed somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
To my knowledge this is currently not listed somewhere?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.