Forums

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

Can You Use OAuth to curl Downloads?

walkerca October 22, 2018

Hi,

I'm curl-ing a few files from my Downloads section.  I defined a BB_USER and hidden BB_PASS and am using these successfully in a build.  Is there a way to use an OAUTH token like the x-token-auth of the Git pull with the curl request? 

I'm trying to avoid involving a user account in the build process.  If there's another alternative, please reply with that.

Thanks,

Carl

1 answer

0 votes
Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 26, 2018

Hey Carl,

We've got a great article on using Bitbucket's API with OAuth in Python. I'm not too familiar with using OAuth in curl (the OAuth dance has always seemed hard enough to leave it up to a library to help with) myself unfortunately. Looks like it can be done, but given the complexity of requesting a token and then making another call with your actual payload and the generated token, I personally would opt for a Python script.

Hope that provides enough info to get you going whichever path you choose!

Cheers,
Daniel

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events