根据API文档,/api/v3/users/list是获取所有用户列表的API。如果出现问题,可以先检查请求是否有误。可以参考以下示例:
// 使用axios发送get请求,获取用户列表
const axios = require('axios');
const config = {
headers: {
'Authorization': 'Bearer ', // 填写登录后获取到的access_token
}
}
axios.get('https://api.amity.co/api/v3/users/list', config)
.then((response) => {
console.log(response.data);
})
.catch((error) => {
console.log(error);
});
注意:填写请求头需要使用自己登录后获取到的access_token,并确保该access_token有获取用户列表的权限。如果该问题仍未解决,可以联系Amity的技术支持。