Forums

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

How to get Token by make Authentication with Email and Password

Mustafa Ahmed
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!
December 6, 2022

I am using API in bitbucket.org, before I can get data with APIs, I need to make Authentication by this API

To access any api endpoint you have to setup auth in your app and ask for email and password and then call the following api:

 https://smartmenu22.com/api/auth/login

 

The API will return in a case of successfull login: a token that you have to save it. And then you can access any API endpoint using that token.

I try this code but it always say Email or Password is not valid

    

var client = new RestClient("https://smartmenu22.com/api/auth/login");
            var request = new RestRequest(Method.POST); 
            request.AddParameter("email", email);
            request.AddParameter("password", password);
            request.AddHeader("cache-control", "no-cache");
            request.AddHeader("content-type", "application/x-www-form-urlencoded");
            IRestResponse response = client.Execute(request);
            dynamic resp = JObject.Parse(response.Content);
            string token = resp.access_token;

 

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 9, 2022

Hi @Mustafa Ahmed,

I would suggest reaching out to the developers or the support team of this API to request assistance. We can assist with any issues related to Bitbucket Cloud, but we can't offer much help with an API of a different product that is not developed by Atlassian.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events