This URL is not available anymore. Does anyone find some more documentation about this topic, because this (Customization :: SuiteCRM Documentation) is not working.
I want to get this endpoint without any authentication, so no need to have a access_token to GET/POST some data. Is it possible to disable the authentication for this specific endpoint, because I still get the error 401 (Unauthorized)?
Of the top of my head i donât know how to disable authorization
But a simpler way (if you are not using any specific api functionality) to do what you want is to make an entrypoint (not an api endpoint) with authorization false
I have a external JavaScript front-end application (Vue.js) where customers can sign in and see there own projects and user details. So I am using the endpoints from SuiteCRM to show their data.
There is just one tiny problem. Because if they forgot their password, there must be the ability to reset their password with a âforgot password?â button. Sounds easy right? create a select-field with âuser forgot passwordâ. Then create a workflow in SuiteCRM that if the User-module changed, and the âuser forgot passwordâ is select, send an e-mail to the user and set the user_forgot_password back to false . But it is not possible to update a record while the user is not logged in, because they donât have an access_token. So I wanted to create an endpoint "/Api/V8/custom/reset_password={user_name} and then trigger a method to update the record with the value: user_forgot_password = true.
Now you know my case, maybe there is a better solution. But I thought creating my own endpoint without authentication would be the best solution.
Actually thatâs the same entrypoint (not an api endpoint) that crm ui uses to reset a users password. It obeys the password and reset settings set in password manager
{
var reply="";
Uri uri = new Uri(string.Format(CRMUrls.baseCRMUrl, string.Empty));
//var MyDynamic = new loginObject();
//MyDynamic.grant_type = "password";
//MyDynamic.client_id = CRMUrls.client_id;
//MyDynamic.client_secret = CRMUrls.client_secret;
//MyDynamic.username = username;
//MyDynamic.password = password;
//string json = JsonConvert.SerializeObject(MyDynamic);
MultipartFormDataContent content = new MultipartFormDataContent();
content.Add(new StringContent("GeneratePassword"), "entryPoint");
content.Add(new StringContent(username), "user_name");
content.Add(new StringContent(email), "user_email");
content.Add(new StringContent("1"), "link");
try
{
var response = await client.PostAsync(uri, content);
if (response.IsSuccessStatusCode)
{
string resp = await response.Content.ReadAsStringAsync();
reply = resp;
if (resp == "1")
{
return resp;
}
}
}
catch (Exception e1)
{
}
return reply;
} ```