Jump to content

CapSolHost

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

CapSolHost's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi, I'm trying to create a library for NodeJS to interact with the Blesta API over HTTP/S. For /blesta/components/models/users/login, one needs to provide a session, which is apparently generated by minPHP, however, minPHP/session was deprecated in 4.6, and I don't think that's availabel by the API anyway. So what do I put there, then? What does a valid "session" look like? Code for reference: const params = new url.URLSearchParams({ session, ["vars[username]"]: vars.username, ["vars[password]"]: vars.password, ["vars[remember_me]"]: vars.rememberMe, }); if (vars.ipAddress) { params.append("vars[ip_address]", ipAddress); } if (vars.otp) { params.append("vars[otp]", otp); } console.log(params.toString()); const r = await axios({ method: "post", url: aUrl + "users/login.json", auth: { username: aUser, password: aKey, }, headers: { "Content-Type": "application/x-www-form-urlencoded", }, data: params.toString(), }).catch((e) => { return Promise.reject( "Server responded with " + e.response.status + ": " + e.response.statusText + ". " + e.response.data.response ); }); console.log(r); return r.data.response;
  2. The current version for use on Blesta's default themes is FontAwesome 4.7.0. Please upgrade to 5.0 or newer to give us the ability to use up to date icons throughout blesta
×
×
  • Create New...