Forums

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

Deployment Rest API Token Invalid

Miles Mai
Contributor
May 5, 2026

I have Create API Token on this url Atlassian account | security | api tokens with scopes “write:deployment-info:jira”, and I want to post data through deployment rest api "/rest/deployments/0.1/bulk" (https://developer.atlassian.com/cloud/jira/software/rest/api-group-deployments/#api-rest-deployments-0-1-bulk-post) However, it’s not work. Always shows below error.

Client must be authenticated to access this resource

And I use httpbasicauth(Email and token) for authorization

auth = HTTPBasicAuth(email, token)

Anyone have advice on it? Many thanks.

Best Regards,

Miles

1 answer

0 votes
Arkadiusz Wroblewski
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.
May 6, 2026

Hello @Miles Mai

The issue here is likely the authentication method rather than the token itself. The Deployments API is a bit unique; it doesn't usually play nice with standard Basic Auth (email + API token). Instead, Atlassian expects this specific endpoint to be called using OAuth 2.0.

Even if your token has the right scopes, the "Client must be authenticated" error is Jira's way of saying it was expecting a Bearer token from an OAuth, not your personal API credentials. To fix this, you’ll need to create OAuth 2.0 credentials in Jira, exchange your client_id and client_secret for an access token, and then use that in your header as Authorization: Bearer <access_token>.

You'll also need to tweak your URL. For OAuth integrations, you should be hitting the global Atlassian API gateway rather than your site URL directly:

POST https://api.atlassian.com/jira/deployments/0.1/cloud/<cloudId>/bulk

If you just want to verify your current API token is active, try a quick GET request to /rest/api/3/myself. If that works but the deployment endpoint fails, you definitely need to switch over to the OAuth flow to get those deployments syncing. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events