# @redredgroup/nestjs-solapi

> SOLAPI integration to a NestJS application

Latest version **1.3.1** (published 2026-05-17) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @redredgroup/nestjs-solapi
pnpm add @redredgroup/nestjs-solapi
yarn add @redredgroup/nestjs-solapi
bun add @redredgroup/nestjs-solapi
```

## Health

**Score 60/100 (C)** — status: active.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 1.3.1 |
| Published | 2026-05-17 |
| First published | 2023-12-03 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | 24.13.0 |
| Dependencies | 3 |
| Unpacked size | 31.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Seihoon Kim |
| Maintainers | jieey1140 |
| Keywords | nestjs, solapi |

## Links

- npm: https://www.npmjs.com/package/@redredgroup/nestjs-solapi
- Repository: https://github.com/REDREDGROUP/nestjs
- Issues: https://github.com/REDREDGROUP/nestjs/issues
- npm.io page: https://npm.io/package/@redredgroup/nestjs-solapi

## Dependencies (3)

- [solapi](https://npm.io/package/solapi.md) 6.0.1
- [handlebars](https://npm.io/package/handlebars.md) 4.7.9
- [randomstring](https://npm.io/package/randomstring.md) 1.3.1

## Recent versions

- 1.3.1 (latest) — 2026-05-17
- 1.3.0 — 2025-10-05
- 1.2.0 — 2024-02-24
- 1.1.1 — 2023-12-04
- 1.1.0 — 2023-12-04
- 1.0.0 — 2023-12-03

## README

# Nestjs Solapi [![Actions Status][gh-actions-badge]][gh-actions] [![Node Version][node-badge]][npm] [![NPM version][npm-badge]][npm]

[gh-actions]: https://github.com/REDREDGROUP/nestjs/actions
[npm]: https://www.npmjs.com/package/@redredgroup%2Fnestjs
[gh-actions-badge]: https://github.com/REDREDGROUP/nestjs/workflows/CI/badge.svg
[node-badge]: https://img.shields.io/node/v/@redredgroup%2Fnestjs-solapi.svg
[npm-badge]: https://img.shields.io/npm/v/@redredgroup%2Fnestjs-solapi.svg

### Introduction

This package is a module that converts the asynchronous Solapi to Nestjs.

## Installation

using npm

```bash
npm install @redredgroup/nestjs-solapi
```

using yarn

```bash
yarn install @redredgroup/nestjs-solapi
```

using pnpm

```bash
pnpm add @redredgroup/nestjs-solapi
```

### Import module

```typescript
import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { SolapiModule } from '@redredgroup/nestjs-solapi';

@Module({
  imports: [
    SolapiModule.forRoot({
      solapiOptions: {
        apiKey: 'YOUR_API_KEY',
        apiSecret: 'YOUR_API_TOKEN',
      },
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}

//Or the forRootAsync module using @nestjs/Config

import { Module } from '@nestjs/common';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { SolapiModule } from '@redredgroup/nestjs-solapi';

@Module({
  imports: [
    SolapiModule.forRootAsync({
      useFactory: () => ({
        solapiOptions: {
          apiKey: 'YOUR_API_KEY',
          apiSecret: 'YOUR_API_TOKEN',
        },
      }),
    }),
  ],
  controllers: [AppController],
  providers: [AppService],
})
export class AppModule {}
```

## Example

### Sending SMS

```typescript
import { Injectable } from '@nestjs/common';
import { SolapiService } from '@redredgroup/nestjs-solapi';

@Injectable()
export class AppService {
  constructor(private readonly solapiService: SolapiService) {}

  async sendingSms(): Promise<string> {
    const sendResult = await this.solapiService.send({
      to: 'target Number',
      from: 'Enter the registered calling number from your account',
      text: 'SMS can be up to 45 Korean characters and 90 alphanumeric characters.',
    });

    console.log(sendResult);

    return 'ok';
  }
}
```

## Custom Class

### SMS Verification (Random String)

```typescript
import { Injectable } from '@nestjs/common';
import { SolapiService } from '@redredgroup/nestjs-solapi';

@Injectable()
export class AppService {
  constructor(private readonly solapiService: SolapiService) {}
  async sendingCustomVerifySms() {
    const sendVerifySmsResult = await this.solapiService.CustomSolapi.SmsVerify.send({
      config: {
        verificationCodeLength: 10, //Code Length
        verificationCodeType: 'ALPHABET_ONLY', // 'NUMBER_ONLY' | 'ALPHABET_ONLY' | 'MIX'
        verificationMessage: 'Verification Code is: {{VERIFICATION_CODE}}', // Inject wherever you want with the {{VERIFICATION_CODE}} format.
      },
      smsOptions: {
        to: 'target Number',
        from: 'Enter the registered calling number from your account',
        type: 'SMS',
      },
    });

    console.log(sendVerifySmsResult.verificationCode);
    console.log(sendVerifySmsResult.smsResult);

    return 'ok';
  }
}
```

## Copyright

© 2025 REDREDGROUP Software. All Right Reserved.

## License

Apache-2.0

---
_Source: https://npm.io/package/@redredgroup/nestjs-solapi · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
