Skip to content

@line/bot-sdk


@line/bot-sdk / manageAudience / ManageAudienceBlobClient

Class: ManageAudienceBlobClient ​

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:50

See ​

LineBotClient for a unified interface that wraps this client.

Constructors ​

Constructor ​

new ManageAudienceBlobClient(config): ManageAudienceBlobClient

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:66

Initializes a new ManageAudienceBlobClient.

Parameters ​

config ​

httpClientConfig

Configuration for this API client.

Returns ​

ManageAudienceBlobClient

Example ​

ts
const client = new ManageAudienceBlobClient({
  channelAccessToken: process.env.LINE_CHANNEL_ACCESS_TOKEN!,
});

Methods ​

addUserIdsToAudience() ​

addUserIdsToAudience(file, audienceGroupId?, uploadDescription?): Promise<MessageAPIResponseBase>

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:87

Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file). Calls PUT https://api-data.line.me/v2/bot/audienceGroup/upload/byFile. To inspect the HTTP status code or response headers, use addUserIdsToAudienceWithHttpInfo.

Parameters ​

file ​

Blob

A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000

audienceGroupId? ​

number

The audience ID.

uploadDescription? ​

string

The description to register with the job

Returns ​

Promise<MessageAPIResponseBase>

A promise resolving to the response body.

See ​

LINE Developers documentation


addUserIdsToAudienceWithHttpInfo() ​

addUserIdsToAudienceWithHttpInfo(file, audienceGroupId?, uploadDescription?): Promise<ApiResponseType<MessageAPIResponseBase>>

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:111

Add user IDs or Identifiers for Advertisers (IFAs) to an audience for uploading user IDs (by file). Calls PUT https://api-data.line.me/v2/bot/audienceGroup/upload/byFile. This method returns the response body together with the underlying httpResponse.

Parameters ​

file ​

Blob

A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000

audienceGroupId? ​

number

The audience ID.

uploadDescription? ​

string

The description to register with the job

Returns ​

Promise<ApiResponseType<MessageAPIResponseBase>>

A promise resolving to the response body together with the underlying httpResponse.

See ​

LINE Developers documentation


createAudienceForUploadingUserIds() ​

createAudienceForUploadingUserIds(file, description?, isIfaAudience?, uploadDescription?): Promise<CreateAudienceGroupResponse>

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:144

Create audience for uploading user IDs (by file). Calls POST https://api-data.line.me/v2/bot/audienceGroup/upload/byFile. To inspect the HTTP status code or response headers, use createAudienceForUploadingUserIdsWithHttpInfo.

Parameters ​

file ​

Blob

A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000

description? ​

string

The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120

isIfaAudience? ​

boolean

To specify recipients by IFAs: set true. To specify recipients by user IDs: set false or omit isIfaAudience property.

uploadDescription? ​

string

The description to register for the job (in jobs[].description).

Returns ​

Promise<CreateAudienceGroupResponse>

A promise resolving to the response body.

See ​

LINE Developers documentation


createAudienceForUploadingUserIdsWithHttpInfo() ​

createAudienceForUploadingUserIdsWithHttpInfo(file, description?, isIfaAudience?, uploadDescription?): Promise<ApiResponseType<CreateAudienceGroupResponse>>

Defined in: lib/manage-audience/api/manageAudienceBlobClient.ts:171

Create audience for uploading user IDs (by file). Calls POST https://api-data.line.me/v2/bot/audienceGroup/upload/byFile. This method returns the response body together with the underlying httpResponse.

Parameters ​

file ​

Blob

A text file with one user ID or IFA entered per line. Specify text/plain as Content-Type. Max file number: 1 Max number: 1,500,000

description? ​

string

The audience's name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120

isIfaAudience? ​

boolean

To specify recipients by IFAs: set true. To specify recipients by user IDs: set false or omit isIfaAudience property.

uploadDescription? ​

string

The description to register for the job (in jobs[].description).

Returns ​

Promise<ApiResponseType<CreateAudienceGroupResponse>>

A promise resolving to the response body together with the underlying httpResponse.

See ​

LINE Developers documentation