Download the PHP package icomm-api/bizgo-sdk-comm without Composer

On this page you can find all versions of the php package icomm-api/bizgo-sdk-comm. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package bizgo-sdk-comm

bizgo-sdk-comm (PHP)

비즈고(Bizgo) 커뮤니케이션 API의 PHP SDK입니다. SMS/LMS/MMS, 국제문자, RCS, 카카오 알림톡·브랜드메시지, 네이버 톡톡을 하나의 클라이언트로 발송하고, 리포트·이력·통계를 조회하고, 웹훅을 검증합니다. 예약 발송, 발신프로필·템플릿 관리, 인사이트, 상담톡 등 나머지 API 전체(스펙의 operation 146개)도 스펙에서 생성한 메서드로 제공하며, 대량 발송·클라이언트 속도 제한·테스트 도구·관측 hook을 포함합니다.

이전 infobank/infobank-omni-api-php7-sdk 또는 infobank/infobank-omni-api-php-sdk(PHP 5)를 쓰고 있다면 이전 SDK에서 옮기기를 참고하세요.

PHP 8.1 이하는 지원하지 않습니다. PHP 8.1은 2025-12-31에 보안 지원이 끝났고(7.x·5.x는 그보다 먼저), 더 이상 보안 수정을 받지 못하는 런타임에서 API Key를 다루는 코드를 돌리지 않도록 최소 버전을 8.2로 정했습니다. PHP 버전 지원 일정은 php.net/supported-versions를 참고하세요.

설치

필요한 확장: curl, json, mbstring (대부분의 PHP 배포판에 기본 포함).

시작하기

  1. 콘솔 발송관리 > 연동관리에서 API Key를 발급하고, 호출할 서버의 공인 IP를 등록합니다.
  2. 키를 환경변수로 설정합니다. 키는 코드나 저장소에 쓰지 않습니다.

  3. sandbox(실제 발송 없음)에서 먼저 확인합니다.

운영에 보낼 때는 environment를 생략하거나 Environment::Production을 씁니다.

접수 ≠ 발송 완료. send->*의 결과는 접수 결과입니다. 최종 결과는 리포트로 받습니다.

발송

모든 채널은 $client->send->omni() 하나로 보냅니다. messages에 여러 개를 넣으면 앞 메시지가 실패할 때 다음 메시지로 대체발송됩니다.

idempotencyKey가 있으면 idempotencyTtl(0~86400초)의 기본값은 86400(Send::DEFAULT_IDEMPOTENCY_TTL)입니다. 비즈고는 키만 있고 TTL이 없는 요청을 A309로 거절하므로, TTL을 비워 두면 SDK가 86400을 채워 보냅니다. 직접 지정한 값(0 포함)은 그대로 보내고, 키가 없으면 TTL을 추가하지 않습니다. send->request()에 넘긴 모델·배열, send->bulk()의 청크, 본문에 두 필드가 모두 있는 생성 메서드에 모두 적용되며 넘긴 모델은 바꾸지 않습니다.

채널 모델 (Bizgo\Model\) 간편 메서드
SMS (90byte) SmsMessage send->sms()
LMS (2,000byte) MmsMessage (fileKey 없음) send->lms()
MMS MmsMessage (fileKey 최대 3개) send->mms()
국제문자 InternationalMessage
RCS RcsMessage
카카오 알림톡 AlimtalkMessage
카카오 브랜드메시지 BrandMessage
네이버 톡톡 NaverTalkMessage

이미지

파일 경로는 로컬 경로만 받습니다(http://, phar:// 같은 스트림 래퍼 거부). 파일은 한 번 읽어 재시도에 같은 바이트를 씁니다.

리포트

콘솔에서 API Key별로 리포트 수신 방식(POLLING 또는 WEBHOOK)을 정합니다.

Polling — 처리에 성공한 배치만 수신 확인(ack)합니다. 처리 함수가 예외를 던지면 같은 배치를 다시 받습니다.

Webhook — 서명을 검증하고 5초 안에 {"msgKey": ...}로 응답합니다. 웹훅 secret은 비즈고에 요청해 별도로 받습니다.

웹훅 서명과 timestamp 허용 오차를 검증하세요. 운영 환경에서는 HTTPS, 비즈고 웹훅 발신 IP 허용 목록, msgKey 기준 중복 제거를 함께 적용하고, 중요한 판단은 리포트·상태 조회 API로 결과를 확인하세요. 서명 비교는 hash_equals(constant-time)이고, timestamp 허용 오차는 기본 300초입니다. 본문이 JSON이 아니거나 너무 크거나(1MB) 깊거나(64단계) 필드 형식이 다르면 WebhookPayloadException(WebhookVerificationException의 하위 클래스, 400으로 응답)입니다.

개별 조회 — $client->reports->inquiry($msgKey) (30일 이내)

조회

전체 API (스펙에서 생성)

P0 편의 메서드(send·files·reports·messages) 밖의 모든 API(스펙의 operation 146개 전체)는 bizgo-api-spec의 x-sdk-* 메타데이터로 생성한 메서드로 제공합니다. 위치는 $client-><리소스>-><메서드>()이고 점으로 구분된 리소스는 중첩 객체입니다.

리소스 예
예약 발송 $client->reservations->create()/list()/get()/update()/cancel()/pause()/resume(), ->recipients->create()/list()/delete()
인사이트 $client->insights->alimtalk->get(), ->brandMessage->getHourly(), ->rcs->getMessage()
카카오 발신프로필 $client->kakao->senders->requestToken()/create()/list(), ->groups, ->categories, ->sanctions
알림톡 템플릿 $client->alimtalk->templates->list()/get()/create()/requestInspection(), ->templateCategories, ->publicTemplates
브랜드메시지 $client->brandMessage->templates, ->groupSends, ->audience, ->friendGroups, ->videos, ->groupTags 등
RCS $client->rcs->brands, ->chatbots, ->templates, ->templateForms, ->templateImages, ->commonFormats
상담톡 $client->counsel->messages->sendPlain()/sendRich(), ->sessions, ->users, ->files, ->channels 등
파일 $client->files->uploadBrandMessageCatalog(), uploadAlimtalkTemplateImage() 등 (P0 업로드 메서드와 같은 객체)

대량 발송

수신자 수 제한 없이 한 메시지를 보냅니다. chunkSize(1~200)씩 나눠 send->omni()를 호출하고, 한 청크가 실패해도 나머지는 계속 보냅니다.

속도 제한 (클라이언트, 프로세스 단위)

클라이언트 인스턴스마다 토큰 버킷 2개가 기본으로 켜져 있습니다.

버킷 기본 한도 비용 대상
send 초당 200 메시지 요청의 destinations 수(최소 1) 스펙의 x-sdk-rate: send operation: sendOmni(send->*, bulk), createReservation, addReservationRecipients, createBrandMessageGroupSend, sendCounselPlain, sendCounselRich
other 초당 5 요청 요청마다 1 그 밖의 모든 API

상담톡 웹훅

상담톡 이벤트(counselMessage, counselReference, counselExpiredSession, counselSeenInfo, counselPersonalInfo, counselCertResult, counselResult)는 WebhookReceiver의 정적 메서드 parseCounselMessage() 등(parse + 이벤트 이름)으로 받습니다. 상담톡 웹훅에는 서명이 없으므로(서명은 리포트·MO 웹훅에만 적용) webhook secret이 필요 없습니다. 응답은 {"code": "A000", "result": "Success"}입니다(리포트·MO와 다름).

오류 처리

재시도와 타임아웃

요청 자동 재시도
조회, 리포트, ack 429, 500/502/503/504, 네트워크 오류
발송 (idempotencyKey 있음) 429, 500/502/503/504, 네트워크 오류
발송 (idempotencyKey 없음), 업로드 429만 (중복 발송 방지)

기본값은 최대 2회 재시도(지수 백오프 0.5·1·2…초 ±25%, 최대 8초, Retry-After 우선·최대 60초), 타임아웃 30초(연결 5초)입니다. 자동 재시도(타임아웃·5xx·429 뒤)한 발송이 A301을 받으면 alreadyAccepted = true와 "이전 시도가 이미 접수됨" 안내가 담긴 DuplicateRequestException을 냅니다(메시지는 한 번만 나감). 리다이렉트(3xx)는 따르지도 재시도하지도 않고 InvalidResponseException(HTTP <상태>)입니다.

내장 cURL 전송은 https_proxy/no_proxy 환경변수도 따르고, 한 클라이언트 안에서 cURL 연결을 재사용합니다(대량 발송에 유리). Guzzle·Symfony 클라이언트를 쓰면 타임아웃은 그 클라이언트 설정을 따릅니다.

테스트 도구 (Bizgo\Testing)

네트워크와 API Key 없이 여러분의 코드를 테스트할 수 있게 패키지에 포함되어 있습니다(쓸 때만 로드되며 운영 코드에는 필요 없음).

기본 응답은 operation별 성공 봉투입니다: 발송(sendOmni, createReservation, addReservationRecipients)은 수신자마다 A000과 가짜 msgKey(createReservation은 가짜 resvKey도), MMS/RCS 업로드는 가짜 fileKey/media, 그 밖은 data.data = {}. 스펙에 없는 경로는 404입니다.

관측 (hooks, OpenTelemetry)

보안

이전 SDK에서 옮기기

infobank/infobank-omni-api-php7-sdk(PHP 7.2+)와 infobank/infobank-omni-api-php-sdk(PHP 5)는 더 이상 유지보수되지 않습니다. API·인증 방식이 다르므로 코드 호환은 없고, 아래처럼 옮깁니다.

이전 SDK (Infobank\) bizgo-sdk-comm (Bizgo\)
https://omni.ibapi.kr, ID/PW로 토큰 발급·캐시 https://mars.ibapi.kr, API Key 하나 (토큰 발급 없음)
new InfobankClient($baseUrl, $token, $clientId, $password) new BizgoClient() (키는 BIZGO_API_KEY)
$client->sendMessage(new SmsMessage(...)) 등 채널별 발송 $client->send->omni(to: ..., messages: [...]) 하나 (채널은 모델로 구분)
Fallback 객체 messages 배열의 순서가 곧 대체발송 순서
registImgFile() / uploadImage() $client->files->uploadMms() / uploadRcs() / uploadBrandMessage()
reportPollingGet() + reportPollingDel() (getReports() + deleteReports()) $client->reports->consume($handler) 또는 poll() + ack()
registForm() 등 Form API 없음 (알림톡·브랜드메시지는 템플릿 자동 치환 발송 사용)
{code, result, data} 응답, 코드 직접 확인 {common, data} 응답을 SDK가 풀고 실패는 예외로
Guzzle·Monolog 의존 PSR 인터페이스만 의존 (Guzzle·Monolog는 원하면 주입)
PHP 5 / 7.2+ PHP 8.2+

이전 저장소의 예제에 있던 인증 정보·전화번호는 그대로 쓰지 마세요.

개발

AI 코딩 도구로 이 저장소를 수정할 때의 규칙은 AGENTS.md에 있습니다. SDK를 사용하는 코드를 AI로 작성할 때는 llms.txt를 컨텍스트로 넣으면 정확도가 높아집니다.

라이선스

Apache-2.0


All versions of bizgo-sdk-comm with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/http-message Version ^1.1 || ^2.0
psr/log Version ^2.0 || ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package icomm-api/bizgo-sdk-comm contains the following files

Loading the files please wait ...