Hi All 
I’ve been attempting to make use of the V3 List Membership API, but I’m coming up against an issue.
const hubspot = require('@hubspot/api-client');
const hubspotClient = new hubspot.Client({"accessToken":"YOUR_ACCESS_TOKEN"});
const listId = "listId";
const after = undefined;
const before = undefined;
const limit = 100;
try {
const apiResponse = await hubspotClient.crm.lists.listAppMembershipApi.getPage(listId, after, before, limit);
console.log(JSON.stringify(apiResponse, null, 2));
} catch (e) {
e.message === 'HTTP request failed'
? console.error(JSON.stringify(e.response, null, 2))
: console.error(e)
}
I’m getting this type error
TypeError: Cannot read properties of undefined (reading 'listAppMembershipApi')
The auth token is correct, and the listId is also correct. Any ideas what might be causing this?
I know it’s currently in Beta, so maybe it’s just not working?
Many thanks in advance
Hi @EddBrisley,
Thank you for asking the Community!
So you are using the Lists (Beta) API, right?
Which action are you trying to do exactly with this endpoint, please?
I’d like to invite a couple of subject matter experts to this conversation: Hi @Bob2245, @GRajput and @himanshurauthan do you have suggestions to help @EddBrisley, please?
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 
Thank you very much and have a lovely day!
Best,
Bérangère
Hi Bérangère, yeah absolutely, and thanks for your response 
Yes it’s the Lists Beta API. The specific endpoint I’m working on is the list membership endpoint </crm/v3/lists/{listId}/memberships>
I’m essentially trying to return a list of deal IDs of the current members of a specific list.
If I try to access the endpoint via something like Postman it’ll work just fine. Also if I structure the API call differently and use the axios library it’ll work too. For example:
const options = {
method: 'GET',
url: `https://api.hubapi.com/crm/v3/lists/${listId}/memberships`,
headers: {
Authorization: `Bearer ${hubspotApiKey}`
}
};
but it’s just odd that you’ll run into a type error when using the standard method shown in the documentation. i.e:
try {
const apiResponse = await hubspotClient.crm.lists.listAppMembershipApi.getPage(listId, after, before, limit);
Perhaps I’m just showing my inexperience! But i suspect others might run into an issue (?)
Let me know if I’m just barking up the wrong tree 
Many thanks
Hi, I have exactly the same issue. Did you have found any solution?
Thanks,
Hi @cpradalier
Yeah I found a solution (if you can call it that) by using the Axios library. Feel free to use the below as a starting point to resolving your issue, and let me know if you have any questions 
const axios = require('axios');
exports.main = async (event, callback) => {
let toObjectIds = event.inputFields['toObjectIds']; // in this example, we're pulling in an array of data from a previous step, for comparison, but adjust this to your needs
toObjectIds = JSON.parse(event.inputFields['toObjectIds']);
const hubspotApiKey = << put your secret here >>;
const listId = 1111; // this represents the list you're targeting
const options = {
method: 'GET',
url: `https://api.hubapi.com/crm/v3/lists/${listId}/memberships`,
headers: {
Authorization: `Bearer ${hubspotApiKey}`
}
};
let responseData = null;
let recordIds = [];
try {
const response = await axios(options);
responseData = response.data;
console.log(responseData);
recordIds = responseData.results.map(item => item.recordId); // In this example I'm mapping the returned data to an array, but you don't necesserily have to do this. If you don't, it'll simply return as a string literal.
} catch (error) {
console.error('Error:', error);
throw error
}
callback({
outputFields: {
responseData: JSON.stringify(responseData)
}
});
};
Hi @EddBrisley, I hope that you are well!
Really glad to see that it is now working for you!
Thank you so much for sharing the solution with the Community!
This will be useful for many other Members!
Have a great day and weekend!
Best,
Bérangère
thanks a lot, it’s all good