Connecting to a session based AUTH


I have an API that I want to connect too, but it uses a session based cookie. I've read the docs and tried to set something up, but I am not doing very well!

I have this implemented with my own api/node server, but I want to recreate it with Retool.

For context, this what I did in node and I want to create a resource the same way.

PBXInterface class

const axios = require('axios');
const user = 'XXXXX';
const password = 'XXXXXXXX';
const md5password = crypto.createHash('md5').update(password).digest('hex');
const baseUrl = '';

const axiosInstance = axios.create({
  baseURL: baseUrl,
  httpsAgent: new https.Agent({
    rejectUnauthorized: false,

//Acquiring and refresh are the same function.
exports.connect = async () => {
  return await axiosInstance
        name: 'auth',
        value: `${user} ${md5password}`,
      { withCredentials: true }
    .then((res) => {'Session token acquired!');
      axiosInstance.defaults.headers.Cookie = `session=${}`;
      return axiosInstance;
    .catch((error) => {
      logger.error(`Error acquiring session token!!`);
      throw new ApiError(httpStatus.INTERNAL_SERVER_ERROR, 'Error acquiring session token!')


The cookie name is session=theCookie

Have you checked out this doc?

:flushed: looking now!