larksuite / oapi-sdk-nodejs Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED
License: MIT License
DEPRECATED
License: MIT License
readme 里好像没有提及,(某内部文档链接已删除) 里也没有给出链接
在使用 SDK 创建、修改用户正常,删除用户时出现以下问题:
TypeError: Cannot read property 'bodySource' of undefined
at /Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:223:42
at Generator.next ()
at /Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:27:71
at new Promise ()
at __awaiter (/Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:23:12)
at deleteTmpFile (/Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:218:37)
at /Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:234:11
at Generator.next ()
at /Users/taoqi/Documents/workspaces/habook/orbiter/node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:27:71
at new Promise ()
[1] Response {
[1] context: Context {
[1] m: Map(4) {
[1] 'ctxKeyConfig' => [Config],
[1] 'x-request-info' => [Request],
[1] 'X-Request-Id' => '202104061423550102121810241A04B055',
[1] 'http_status_code' => 400
[1] }
[1] },
[1] code: 99991668,
[1] msg: 'token invalid, err:fail to validate OAuth access token from passport, authToken is nil',
[1] error: undefined,
[1] data: undefined
[1] }
能再敷衍点吗
Can I include excalidraw drawings in lark docs while syncing their JSON data with the document? how?
Otherwise, would you consider adding first-class support for excalidraw in lark?
nodejs sdk @byted-service/[email protected]下getIdsByEmailV4接口,取已离职的人的open_id会报这个错误,客服同学反馈说是sdk这边的bug
https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/chat-members/delete
比如这个接口,http method 为 ‘DELETE’, 不会自动设置 content-type:application/json; charset=utf-8, 也没有接口可以设置。
test
@larksuiteoapi/[email protected]
readme示例中的的store方法是用的 new lark.core.DefaultStore()
,但看DefaultStore
的缓存机制的expire的单位是ms的
而在使用侧缓存access_token时,是直接将token的exipire(单位s)作为参数传给了store ,这导致了如果直接使用 new lark.core.DefaultStore()
时,没法做到缓存效果,两者的expire字段单温是否能保持一致?
我看到express 可以在路由里直接
res.status(200).send("ok");
但是因为有时候需要响应飞书那边的验证信息, 需要用handler 里自带的 decrypt, 也不能这么做.
怎么样可以兼顾这两个事情?
通讯录 部分,创建用户,没有 job_title(职务)这个字段?
发包出问题了,@larksuiteoapi/[email protected] 没有发成功。
参考文档:https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/reference/im-v1/message/create
示例代码:
const req = lark.api.newRequest(
'/open-apis/im/v1/messages',
'POST',
lark.api.AccessTokenType.Tenant,
body
);
req.setQueryParams({
receive_id_type: 'email',
});
lark.api.sendRequest(conf, req).then((r) => {
console.log(r);
});
错误响应:
code: 9499,
msg: 'Bad Request',
data: {}
说明:发现文档内的文档接口已经升级,实例里面的接口还是老的,调用新的接口会报错参数错误。
我们想通过飞书实现发起即时视频会议的功能。
飞书开放平台的文档上说,/open-apis/message/v4/send
接口已经过时,需要升级到 open-apis/im/v1/messages
,请问下新的版本预期什么时候会发布呢
正常调用赋予权限的接口,sdk内部报错
const addPermissionsUri = 'https://open.feishu.cn/open-apis/drive/v1/permissions/:token/members';
const request = larksuite.api.newRequest(addPermissionsUri, 'POST', this.ctx.app.larksuite.Tenant, {
member_type: 'email',
member_id: email,
perm: 'full_access',
});
request.setPathParams({ token });
request.setQueryParams({ type, need_notification: true });
const res = await larksuite.api.sendRequest(this.ctx.app.larksuite.conf, request);
return res;
TypeError: Cannot read property 'bodySource' of undefined
at /node_modules/@larksuiteoapi/api/dist/core/handlers/handlers.js:232:42
简单地说,直觉上我认为拿demo应该能绑定订阅事件的”配置请求网址“
然而我使用了express的demo并不能
我只能拼凑其他的部分来使得可以与express集成
示例代码为
lark.event.startServer(conf, 8089)
如果程序中已经启动的一个http server, 能否直接传入lark?
配置使用 Redis 保存凭证时是否需要考虑加锁?
欢迎使用官方新版node-sdk:https://github.com/larksuite/node-sdk
这样做可以满足一套代码与环境适配多个租户的相同机器人。
最近在开发机器人,需要在测试租户测试,发现httpHandle调用的时候必须手动传入config,不能根据事件订阅的event.header.app_id自动识别该使用哪一个config。
这个需求可以考虑一下不?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.