Skip to content
This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

contextsRequest create API issues #120

@sbcalculas

Description

@sbcalculas

global.NLP = require('apiai')(APIAI_TOKEN);
let dialogFlowToken = "1234567890"
let context = [
{
"name": "Sample_Context",
"parameters": {
"location": "Bedroom"
},
"lifespan": 5
}
];
const apiaiReq = global.NLP.contextsRequest(context, { sessionId: dialogFlowToken });
apiaiReq.on('response', async (response) => {
console.log(response);
});
apiaiReq.on('error', (error) => {
console.log(error);
});
apiaiReq.end();
}

The response is {"status":{"code":200,"errorType":"success"}}

But in the next request there is no context i am getting back.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions