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