Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
myinterview
Advanced tools
Build and integrate myInterview with ease via our node.js npm package and connect to the myInterview API.
The documentation for the myInterview API can be found here.
This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.
$ npm -v && node -v
6.13.4
v8.17.0
npm i myinterview
:warning: Do not use this Node.js library in a front-end application. Doing so can expose your myInterview credentials to end-users as part of the bundled HTML/JavaScript sent to their browser.
const { MyInterviewApi } = require('myinterview');
MyInterviewApi.setConfig({
secret: 'yoursecret',
companyId: 'yourcompanyid',
accessKey: 'youraccesskey',
});
To use the SDK you have to set the configuration with the keys provided by myinterview prior use of the classes.
Field | Type | Description |
---|---|---|
statusCode | number | Status code of the response |
errorCode | number | Internal error code |
statusReason | string | Info message of the response |
callId | string | Internal call ID |
data | any | This field contain the data required based on the request |
time | Date / number | Timestamp |
This is the response object you will receive from the SDK the content of data will change based on your request.
Field | Type | Description |
---|---|---|
*errorMessage | string | Error message |
errorDetails | string | Error message details |
*statusCode | number | Status code of the response |
*errorCode | number | Internal error code |
*statusReason | string | Info message of the response |
*callId | string | Internal call ID |
*time | Date / number | Timestamp |
*required field |
The test mode is not connected to any Database all the call are just checking if the payload or the url are correct if you try to create or update nothing will be saved as all the response are mock data.
const { Jobs } = require('myinterview')
The Job Model serves as the starting point for setting up video interviews. It allows you to configure various aspects of the interview, such as questions, link appearance, description, and more.
Note: To invite a candidate for a myInterview video interview, a Job Model must be set up first.
There are several ways to create a Job Model:
createJob
API endpoint to create a Job Model with the required information.createJobWithCandidates
API endpoint to create a Job Model along with associated candidate(s) by providing the necessary information in the request.getJobUpdateUrl
API endpoint, or by adding the option in createJob
. This allows for easy updates to your created Job Model. For more details, refer to the documentation below.Once the Job Model is set up, you can manage and monitor the progress of your video interviews. You can view the status of individual candidates, review completed interviews, and make informed decisions based on the candidates' responses. The Job Model ensures a streamlined and efficient interview process, enabling you to find the best talent for your organization.
Note: When creating a job, there are two ways to invite a candidate:
- Explicitly create a candidate and send a personalized invitation.
- Obtain the direct link from the response, which can be sent to any candidate without a formal invitation.
const res = await Jobs.getJobs();
const jobs = res.data;
const ids = ['id1', "id2"]
const res = await Jobs.getJobsByIds(ids);
const jobs = res.data;
You can obtain the new update URL to access a sleek and user-friendly interface in myInterview, which makes it easy to update your created job. If you add the options object with the flag getUpdateUrl.
const id = "job_id"
const options = { getUpdateUrl: true };
const res = await Jobs.getJob(id);
const job = res.data;
const body = {
title: "job_title",
language: 'en',
overlay: '#000000',
config: {
hideQuestions: true,
practice: true
},
jobDescription: 'jobDescription',
logo: "logo.url.com",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?",
description: "This is a description",
thinkingTime: 30
}],
// fields available: (cvUrl,phoneNumber,document,coverLetter,socialProfile,website,linkedin,address)
jobInputFields: [
{
fieldName: 'cvUrl',
required: true
},
{
fieldName: 'phoneNumber',
},
{
fieldName: 'additionalFile',
required: false
},
template_id: 'any-template-id',
]
}
await Jobs.createJob(body);
Field | Type | Description |
---|---|---|
*title | string | Title of the job |
template_id | string | If the template ID is given you will create your job with the template questions |
language | string | Language of the job |
overlay | string | Overlay of the of the application page (Value in Color Hexa #000000) |
termsUrl | string | Url of the Terms of Service |
privacyUrl | string | Url of the Privacy |
backgroundImage | string | Background Image of the of the application page |
transcriptLanguage | string | Language of the transcript video |
*config | Config Object | Configuration object |
deadlineDate | ISO Date string | Deadline date for the job |
experience | string | experience of the job |
jobDescription | string | Job description |
logo | string | Logo |
*questions | Array of job questions | Array of job questions objects |
skills | Array of string | skills |
introVideo | string | introduction video for application page |
jobInputFields | array | list of document that you will ask the candidate for. (Maximum length is 3 elements) |
jobInputFields.*.fieldName | string | name of document need to be in the following (cvUrl,phoneNumber,additionalFile,coverLetter,socialProfile,website,linkedin,address) |
jobInputFields.*.required | boolean | flag indicating if the document is required |
*required field |
Comment: Setting up the AI for a job including its persona qualities is made via “Configure job's candidates qualities“ endpoint. You can find it under jobs section.
This call will create for you the job, candidate and will send an invite email to the candidate.
const body = {
template_id: 'template_id', // If provided the questions will be taken from template
title: "job_title",
language: 'en',
overlay: '#000000',
config: {
practice: true
},
jobDescription: 'jobDescription',
logo: "logo.url.com",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?",
description: "This is a description",
thinkingTime: 30
}],
// fields available: (cvUrl,phoneNumber,document,coverLetter,socialProfile,website,linkedin,address)
jobInputFields: [
{
fieldName: 'cvUrl',
required: true
},
{
fieldName: 'phoneNumber',
},
{
fieldName: 'additionalFile',
required: false
},
],
candidates: {
communication: true,
reminders: true,
deadlineDate: "2021-10-20T08:42:59.537+00:00",
timezoneForInvite: "Australia/Sydney",
candidates: [{
username: "username",
email: "email@email.com",
}]
}
}
await Jobs.createJobWithCandidates(body);
Field | Type | Description |
---|---|---|
template_id | string | If the template ID is given you will create your job with the template questions |
*title | string | Title of the job |
questions | Array of job questions | Array of job questions objects is required if you don't provide template_id |
language | string | Language of the job |
overlay | string | Overlay of the of the application page (Value in Color Hexa #000000) |
termsUrl | string | Url of the Terms of Service |
privacyUrl | string | Url of the Privacy |
backgroundImage | string | Background Image of the of the application page |
transcriptLanguage | string | Language of the transcript video |
config | Config Object | Configuration object |
deadlineDate | ISO Date string | Deadline date for the job |
experience | string | experience of the job |
jobDescription | string | Job description |
logo | string | Logo |
skills | Array of string | skills |
introVideo | string | introduction video for application page |
jobInputFields | array | list of document that you will ask the candidate for. (Maximum length is 3 elements) |
jobInputFields.*.fieldName | string | name of document need to be in the following (cvUrl,phoneNumber,additionalFile,coverLetter,socialProfile,website,linkedin,address) |
jobInputFields.*.required | boolean | flag indicating if the document is required |
*required field |
Comment: Setting up the AI for a job including its persona qualities is made via “Configure job's candidates qualities“ endpoint. You can find it under jobs section.
const body = {
job_id: 'job_id',
title: "job_title",
language: 'en',
overlay: '#000000',
config: {
hideQuestions: true,
practice: true
},
jobDescription: 'jobDescription',
logo: "logo.url.com",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?",
description: "This is a description",
thinkingTime: 30
}],
// fields available: (cvUrl,phoneNumber,document,coverLetter,socialProfile,website,linkedin,address)
jobInputFields: [
{
fieldName: 'cvUrl',
required: true
},
{
fieldName: 'phoneNumber',
},
{
fieldName: 'additionalFile',
required: false
},
],
}
await Jobs.updateJob(body);
Field | Type | Description |
---|---|---|
*job_id | string | ID of the job |
template_id | string | If the template ID is given you will update your job with the template questions |
title | string | Title of the job |
language | string | Language of the job |
overlay | string | Overlay of the of the application page (Value in Color Hexa #000000) |
termsUrl | string | Url of the Terms of Service |
privacyUrl | string | Url of the Privacy |
backgroundImage | string | Background Image of the of the application page |
transcriptLanguage | string | Language of the transcript video |
config | Config Object | Configuration object |
deadlineDate | ISO Date string | Deadline date for the job |
experience | string | experience of the job |
jobDescription | string | Job description |
logo | string | Logo |
questions | Array of job questions | Array of job questions objects |
skills | Array of string | skills |
introVideo | string | introduction video for application page |
jobInputFields | array | list of document that you will ask the candidate for. (Maximum length is 3 elements) |
jobInputFields.*.fieldName | string | name of document need to be in the following (cvUrl,phoneNumber,additionalFile,coverLetter,socialProfile,website,linkedin,address) |
jobInputFields.*.required | boolean | flag indicating if the document is required |
*required field |
Create/Edit the top 5 qualities in the ideal candidate. candidates will be scored according to that.
const body = {
job_id: 'job_id',
intelligence: [
{
name: 'Creative',
order: 1,
},
{
name: 'Persuasive',
order: 2,
},
{
name: 'Assertive',
order: 3,
},
{
name: 'Optimistic',
order: 4,
},
{
name: 'Outgoing',
order: 5,
},
],
};
const res = await Jobs.updateJobIntelligence(body);
Field | Type | Description |
---|---|---|
*job_id | string | job_id |
*intelligence.order | number | order from 1 to 5 |
*intelligence.name | string | trait name needs to be one of the following values: Creative, Strategic, Disciplined, Driven, Friendly, Outgoing, Assertive, Persuasive, Stress Tolerant, Optimistic |
*required field |
You can obtain the new update URL to access a sleek and user-friendly interface in myInterview, which makes it easy to update your created job.
const id = "job_id"
const res = await Jobs.getJobUpdateUrl(id);
const url = res.data.url;
const { Candidates } = require('myinterview');
The Candidate Model is designed to facilitate inviting a candidate for a job interview. It stores all necessary information for generating an invitation and must be linked to a pre-existing job. This information is used to invite the candidate and generate a personalized myInterview video interview link.
Within the Candidate Model, there is a status field that indicates the current state of the invitation.
Note: The Candidate Model itself is not the video; the video refers to the actual video interview that can be played back.
Upon the Candidate Model's status changing to "completed," a video_id will be assigned to both the Candidate Model and the associated video. This identifier can be utilized to access the video interview for playback.
Get candidate details by id.
const res = await Candidates.getCandidate('candidate_id');
const candidate = res.data;
Lists all candidates of a job including their created date, their invite status and personal details like name and email.
const body = {
job_id: "job_id",
query: {
ids: ['candidate_id1', 'candidate_id2'],
email: 'email@email.com',
status: 'pending',
username: 'username',
skip: 0,
limit: 20,
}
};
const res = await Candidates.getJobCandidates(body);
const candidates = res.data;
Field | Type | Description |
---|---|---|
*job_id | string | ID of the job |
query.ids | string array | ids of candidates you need |
query.email | string | email of candidate you need |
query.status | string | status of the candidate enum (pending, clicked, completed, cancelled) |
query.username | string | username of candidate you need |
query.skip | number | Pagination |
query.limit | number | Pagination |
*required field |
Create one or more candidates.
const body = {
job_id: "job_id",
communication: true,
reminders: true,
deadlineDate: "2021-10-20T08:42:59.537+00:00",
timezoneForInvite: "Australia/Sydney",
candidates: [{
username: "username",
email: "email@email.com",
jobTitle: "Job title",
}]
};
await Candidates.createBulkCandidates(body);
Field | Type | Description |
---|---|---|
*job_id | string | ID of the job to connect the candidate |
communication | boolean | Flag to send mail to invited candidates (default = false) |
reminders | boolean | Flag to activate reminders mails |
deadlineDate | ISO Date string | Deadline date for the candidate/s |
timezoneForInvite | string | Timezone for the deadline |
*candidates | Array of candidate object | Array of candidate objects |
*required field |
This call will create one or more candidates and connect them to your Job.
Update candidates details, deadline change is optional.
const body = {
id: "candidate_id", // You have to provide the id of the candidate
username: "username",
email: "email@email.com",
jobTitle: "Job title",
};
await Candidates.updateCandidate(body);
Field | Type | Description |
---|---|---|
*id | string | ID of the candidate |
status | string | Status of the candidate |
username | string | Username of the candidate |
deadline | ISO Date string | Deadline date for the candidate/s |
timezoneForInvite | string | Timezone for the deadline |
*required field |
Delete candidates bulk by ids.
const body = {
candidateIds: ["candidate_id", "candidate_id1", "candidate_id2"]// You have to provide the id of the candidate
};
await Candidates.deleteBulkCandidates(body);
Field | Type | Description |
---|---|---|
*candidateIds | string array | IDs of the candidates |
*required field
const { Companies } = require('myinterview')
The Company Model consolidates all information about your company, making it an excellent starting point for retrieving your company's details in JSON format using the getCompanyInfo
API endpoint.
Additionally, you can set up templates to avoid rewriting questions repeatedly. Simply use the template_id when creating a job. For an example, refer to the Job Model section.
Note: You can also configure templates within the myInterview dashboard and reuse them by calling the
getCompanyTemplates
API endpoint.
const res = await Companies.getCompanyInfo();
const companyInfo = res.data;
Returns an array of job questionnaire templates.
const res = await Companies.getCompanyTemplates();
const templates = res.data;
Create job questionnaire templates. These questions will be displayed to the candidates when they apply during the video recording session.
const body = [{
id: "template_id",
name: "template_name",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?"
}],
introVideo: 'youtube.com/watch'
},
{
id: "template_id",
name: "template_name",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?",
description: "This is a description",
thinkingTime: 30
}],
introVideo: 'youtube.com/watch'
}]
await Companies.createCompanyTemplateBulk(body);
Field | Type | Description |
---|---|---|
*id | string | ID of the company template |
hideQuestions | boolean | questions will not be displayed upfront |
*name | string | Name of the template |
introVideo | string | Url of the introduction video on the application page |
*questions | Array of job questions | Array of job questions objects |
*required field |
const body = {
id: "template_id",
name: "template_name",
questions: [{
numOfRetakes: 1,
partDuration: 30,
question: "How are you today?",
description: "This is a description",
thinkingTime: 30
}],
introVideo: 'youtube.com/watch'
};
await Companies.updateCompanyTemplate(body);
Field | Type | Description |
---|---|---|
*id | string | ID of the company template |
hideQuestions | boolean | questions will not be displayed upfront |
name | string | Name of the template |
introVideo | string | Url of the introduction video on the application page |
*questions | Array of job questions | Array of job questions objects |
*required field |
const { Videos } = require('myinterview')
The Video Model represents the final stage of the typical workflow when a candidate has completed their video recording.
Note: To remove a video from your job kanban, you must delete the video, not the candidate, using the
deleteBulkVideos
API endpoint.
There are two options to view the video:
getShareLink
API endpoint.Get the video information including the video playable url and transcript and AI results. (according to your subscription)
const body = {
video_id: 'video_id',
ai: true,
transcript: true
}
const res = await Videos.getVideo(body);
const video = res.data;
Field | Type | Description |
---|---|---|
*video_id | string | ID of the Video |
ai | boolean | add ai object to the video object |
transcript | boolean | add transcript object to the video object |
*required field |
Get all videos, including the video playable url and transcript and AI results. (according to your subscription)
const body = {
ai: true,
transcript: true,
username: 'fullname',
email: "email@example.com",
skip: 0,
limit: 20
}
const res = await Videos.getVideos(body);
const videos = res.data;
Field | Type | Description |
---|---|---|
ai | boolean | add ai object to the video object |
transcript | boolean | add transcript object to the video object |
username | string | get with specific username |
string | get with specific email | |
skip | number | for pagination |
limit | number | for pagination |
*required field |
Get the videos of the candidates who applied to a job.
const body = {
job_id: 'job_id',
query: { // Optional
email: "email@example.com",
username: "fullname",
candidate_id: "candidate_id",
skip: 20,
limit: 20
}
}
const res = await Videos.getJobVideos(body);
const videos = res.data;
Field | Type | Description |
---|---|---|
*job_id | string | ID of the job |
query | Query Object | Query object |
*required field |
Get the candidate/video recording share url. With this video url you can watch and review the application on myinterview share page without login.
const id = "video_id"
const res = await Videos.getShareLink(id);
const shareLink = res.data.shareLink;
Delete videos bulk by ids.
const body = {
videoIds: ["video_id", "video_id1", "video_id2"]// You have to provide the id of the candidate
};
await Candidates.deleteBulkVideos(body);
Field | Type | Description |
---|---|---|
*videoIds | string array | IDs of the videos |
*required field
const { Shares } = require('myinterview');
The Share Model provides a method for generating a personalized URL containing the video_id(s) you want to share with others. For example, if you have several video candidates you'd like to share with a colleague or another party, you can use the getShortlistUrl
API endpoint to obtain a URL featuring the selected videos and comments on the candidates.
This feature makes it easy to collaborate with team members, hiring managers, or other stakeholders involved in the recruitment process. By sharing a single URL, you can provide access to specific candidate videos, enabling efficient evaluation and discussion. The Share Model simplifies the process of sharing candidate information and streamlines decision-making, helping your organization identify the best talent.
Create shortlist of selected candidates and share it with your teammates.
const body = {
candidate_videos: [
{
id: 'video_id',
},
],
job_id: 'job_id',
anonymised: true,
share_personality: true,
recipients: [
{
recipient_email: 'mail@myinterview.com',
recipient_name: 'Harry Potter',
},
],
};
const res = await Shares.getShortlistUrl(body);
const shortlistUrl = res.data.shortlistUrl;
Field | Type | Description |
---|---|---|
*candidate_videos | Array of Object | Ids of the videos you want to share |
*job_id | string | ID of the job |
anonymised | boolean | Flag to anonymised the candidates name |
share_personality | boolean | Flag to add AI Insights |
recipients | Array of Object | Array of recipients (recruiters) if you add some they will receive a mail with the link to comment the videos |
*required field |
const { Webhooks } = require('myinterview');
You can configure a webhook to receive notifications each time one of your candidates completes a video interview. To set up a webhook, provide a URL where a POST request will be sent with the following payload (example data):
{
"videoID": "599bfd33-9f46-478d-be96-0490d59b2cbc",
"candidate_email": "candidate_email@test.com",
"candidate_name": "Candidate's Name",
"interview_URL": "https://share.myinterview.com/video/EMySrUICZPlVFYlR2ry4UKZxEDirhK53t923",
"interview_date": "2021-10-28T09:42:22.959Z",
"candidateID": "369b0d23-9f46-408d-be96-0490d8kds63gw",
"jobID": "k99b0po0-2w46-4pdd-b106-049338kds9ojdw",
"jobTitle": "Webhook Job Test"
}
By implementing a webhook, you can automate the process of receiving updates about candidate video completions, making it easier to track and manage your recruitment process. This helps you stay informed of candidates' progress in real-time, enabling you to take timely actions, such as evaluating their interviews or moving them to the next stage of the hiring process. The webhook also allows for seamless integration with your existing recruitment tools and platforms, streamlining your workflow and improving overall efficiency.
const body = {
url: 'https://webhook.test',
}
const res = await Webhooks.testWebhook(body);
Field | Type | Description |
---|---|---|
*url | string | webhook url |
*required field |
const body = {
url: 'https://webhook.io',
}
const res = await Webhooks.createWebhook(body);
Field | Type | Description |
---|---|---|
*url | string | webhook url |
*required field |
You can get the list of timezones on this link
You can catch the error the same way you catch error normally.
try {
const res = await Videos.getVideoPersonality("");
} catch (error) {
// The error will be of type IApiErrorObj the definition is above.
console.log(error)
}
Videos.getVideoPersonality("").then((res) => {
// Type IApiResponseObj
}).catch((error) => {
// The error will be of type IApiErrorObj the definition is above.
console.log(error)
})
This call will populate the headers you need to connect to the global API service it will return an object that you can use in you request. In order to authenticate to the API you need to populate the headers (x-myinterview-timestamp, x-myinterview-key, x-myinterview-signed) the populateHeaders method will return an object that you need to include in the headers config.
import { MyInterviewApi } from 'myinterview';
MyInterviewApi.populateHeaders({
secret: 'yoursecret',
companyId: 'yourcompanyid',
accessKey: 'youraccesskey',
});
It will return:
{
'x-myinterview-timestamp': 'headTimestamp',
'x-myinterview-key': 'headKey',
'x-myinterview-signed': 'headSigned'
}
FAQs
Build and integrate myInterview with ease via our node.js npm package and connect to the myInterview API.
We found that myinterview demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.