Forums

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

REST API Authentication

Harwinder S
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 28, 2018

I have a Java application deployed on Google App Engine. I need to commit plain text files from this application to my BitBucket repo using REST API. What type of authentication would be appropriate for my use case? 

I read about 4-5 different types of authentication in the documentation, but cannot fully understand it. 

I need something like an API key or a service account to access the BitBucket repo. The whole process runs at the backend, and there's no end-user involvement in it.

If there are any code samples for Java, they would be very helpful too.

 

UPDATE 1: I managed to implement a fully functional Java servlet to commit files, but using Basic authentication (supplying account user name and password as part of the request header).

I would like to avoid hard-coding user name and password in the code. 

 

1 answer

0 votes
Gonchik Tsymzhitov
Community Champion
October 23, 2018

Hi! 

 

Let's use the Oauth authentication model.

https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html

 

Cheers,

Gonchik Tsymzhitov

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events