Skip to content

设置的自定义请求头不起作用 #25

@tzz-v

Description

@tzz-v

版本:^1.8.1
设置的自定义请求头不起作用

import { data } from '../../../env';
import * as lark from '@larksuiteoapi/node-sdk';

const client = new lark.Client({
  appId: data.appId,
  appSecret: data.appSecret,
});

class Feishu {
  public accessToken = 't-g1041gdxODD4F2FX5VTFKDXFNG3DO24Z5MDPLBBF';
  public getChatIdByRobotId() {
    return client.im.chat.list(undefined, {
      headers: {
        Authorization: `Bearer ${this.accessToken}`,
      },
    }
    // lark.withTenantToken(`Bearer ${this.accessToken}`)
  );
  }
}
const service =  new Feishu();
service.getChatIdByRobotId();

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions