Giter VIP home page Giter VIP logo

Comments (18)

githublaohu avatar githublaohu commented on July 28, 2024

jsdom 库 强制检查了跨域

// don't send the real request if we aren't allowed to use the headers if (!validCORSPreflightHeaders(xhr, resp, flag, properties)) { setResponseToNetworkError(xhr); return; }

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

是字节租户的同学吗?内部对域名做了限制,看一下这篇云文档:字节自建应用调用飞书服务端OpenAPI改造手册

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

可以提供链接吗?
Java 可以调用,nodejs 调用失败。

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

可以提供链接吗? Java 可以调用,nodejs 调用失败。

飞书私聊下我?mazhe.nerd

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

只能有手机号 与邮箱添加....

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

或则提供二维码,可以吗?

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

只能有手机号 与邮箱添加....

[email protected]

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

麻烦,通过下申请好友请求

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

麻烦,通过下申请好友请求

我这边收不到请求;如果不是字节租户的同学上述方法可能不适用;可以提供一个最小复现化demo我这边排查下嘛?

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

有类似的微信沟通群吗?

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

有类似的微信沟通群吗?

没有;通过github issue机制来解决问题。同学先用最小demo复现一下?

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

只是做了简单的非常

class FeishuProvider {
  client: lark.Client;

  constructor() {
    this.client = new lark.Client({
      appId: "cli",
      appSecret: "C",
    });
  }

  sendMessage(receive_id: string, msg_type: string, content: string) {
    this.client.im.message
      .create({
        data: {
          receive_id: receive_id,
          msg_type: msg_type,
          content: content,
        },
        params: {
          receive_id_type: "chat_id",
        },
      })
      .then((data) => {
        console.log("发送成功");
      })
      .catch((e) => {
        console.log("发送失败");
      });
  }
}
const data = {
      service_name: "kemon-next",
      IP: "127.0.0.1",
      start_time: new Date().toLocaleString(),
      start_up_time: 3,
      environment: env.NODE_ENV,
      error: error,
      status: error != undefined ? "success" : "fail",
    };
    feishu.sendMessage(
      "oc",
      "interactive",
      JSON.stringify(data),
    );

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

OK;sdk的版本是1.23.0吧

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

我这边试了一下是OK的,看上面报错是不是系统开了什么代理,导致open.feishu.cn的请求都挂了;可以试下不用sdk,用axios裸调用一下这个获取token的api看看能不能调通?:https://open.feishu.cn/document/server-docs/authentication-management/access-token/tenant_access_token_internal
image

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

最新版本 1.23.0...
还是异常

TypeError: Cannot destructure property 'tenant_access_token' of '(intermediate value)' as it is undefined. at TokenManager.<anonymous> (/leaning/work/temp/kemon/.next/server/chunks/eef6e_@larksuiteoapi_node-sdk_es_index_a9f269.js:51011:21) at Generator.next (<anonymous>) at fulfilled (/leaning/work/temp/kemon/.next/server/chunks/eef6e_@larksuiteoapi_node-sdk_es_index_a9f269.js:86:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {stack: "TypeError: Cannot destructure property 'tenant_acc…jections (node:internal/process/task_queues:95:5)", message: "Cannot destructure property 'tenant_access_token' of '(intermediate value)' as it is undefined."}

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

请问没有问题。依赖库进行检查,

from node-sdk.

githublaohu avatar githublaohu commented on July 28, 2024

同的哈。

POST https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal
Content-Type: multipart/form-data

{
  "app_id": "cli",
  "app_secret": "1"
}

返回的结果

{
  "code": 0,
  "expire": 7200,
  "msg": "ok",
  "tenant_access_token": "t-g10435b9BNTGEEOLG5EQHDPCHWZAFJ5DMT4VAWWR"
}

from node-sdk.

mazhe-nerd avatar mazhe-nerd commented on July 28, 2024

奇怪,加一下这个开发者互助交流群,艾特一下mazhe.nerd,群里沟通下:
邀请你加入飞书群,快点击https://go.feishu.cn/join-chat/58fr62a3-ae11-478c-b4fe-e2df2aacbdac加入吧!

from node-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.