# 대행사 키 조회

## Request

## RBC에서 발급된 최종 대행사 키를 조회합니다.<br>

> RBC 에서 발급된 최종 대행사 키를 조회합니다.  \
> \
> &#x20; \+ \*\*계정 권한: 대행사\*\*  \
> \
> 대행사 키의 재발급, 삭제는 RBC 홈페이지에서만 가능합니다.  \
> 대행사 키 재발급 시,  \
> \
> &#x20; \+ 이전 대행사 키는 재발급 후 24시간 동안 유효하며, 24시간 경과 후 자동 삭제됩니다.  \
> \
> &#x20; \+ 대행사키의 유출이 우려되어 즉시 삭제를 원할 경우, RBC 웹사이트를 통해 직전 대행사키를 수동 삭제할 수 있습니다.  \
> &#x20;   이 경우 신규 대행사키로만 메시지 전송이 성공되며, 직전 대행사키로 메시지 전송 시 실패됩니다.  \
> &#x20;   ( 경로 : RBC대행사 계정 로그인 > 내 계정관리 > Agency Key )<br>

```json
{"openapi":"3.0.0","info":{"title":"RCS Biz Center API 규격","version":"1.1.15"},"servers":[{"description":"RCS Biz Center API for Staging","url":"https://api-qa.rcsbizcenter.com/api/1.1"},{"description":"RCS Biz Center API for Production","url":"https://api.rcsbizcenter.com/api/1.1"}],"security":[{"jwtAuth":[]}],"components":{"securitySchemes":{"jwtAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"인증방식은 JWT인증을 사용합니다. 토큰의 갱신은 없으며 토큰 만료 시 항상 재발급 받아야 합니다.\n"}},"parameters":{"AgencyId":{"name":"agencyId","in":"path","schema":{"type":"string","maxLength":20},"required":true,"description":"maxLength: 20 - RCS Biz Center에 등록된 대행사 ID 입니다.\n"}}},"paths":{"/agency/{agencyId}/agencyKey":{"get":{"summary":"RBC에서 발급된 최종 대행사 키를 조회합니다.\n","description":"RBC 에서 발급된 최종 대행사 키를 조회합니다.  \n\n  + **계정 권한: 대행사**  \n\n대행사 키의 재발급, 삭제는 RBC 홈페이지에서만 가능합니다.  \n대행사 키 재발급 시,  \n\n  + 이전 대행사 키는 재발급 후 24시간 동안 유효하며, 24시간 경과 후 자동 삭제됩니다.  \n\n  + 대행사키의 유출이 우려되어 즉시 삭제를 원할 경우, RBC 웹사이트를 통해 직전 대행사키를 수동 삭제할 수 있습니다.  \n    이 경우 신규 대행사키로만 메시지 전송이 성공되며, 직전 대행사키로 메시지 전송 시 실패됩니다.  \n    ( 경로 : RBC대행사 계정 로그인 > 내 계정관리 > Agency Key )\n","parameters":[{"$ref":"#/components/parameters/AgencyId"}],"responses":{"200":{"description":"페이지 내 Response 섹션 참조"}}}}}}
```

## Response

<table data-full-width="true"><thead><tr><th width="147">필드명</th><th width="141">타입</th><th width="68" align="center">길이</th><th width="108" align="center">필수여부</th><th width="119">기본값</th><th>설명</th></tr></thead><tbody><tr><td><a href="#result-array-less-than-object-greater-than"><mark style="color:blue;"><strong><code>result</code></strong></mark></a></td><td>array&#x3C;object></td><td align="center"></td><td align="center">O</td><td></td><td>대행사 키 정보입니다.</td></tr><tr><td><strong><code>code</code></strong></td><td>string</td><td align="center">5</td><td align="center">O</td><td>20000000</td><td></td></tr><tr><td><strong><code>status</code></strong></td><td>integer</td><td align="center">3</td><td align="center">O</td><td>200</td><td></td></tr><tr><td><strong><code>desc</code></strong></td><td>string</td><td align="center"></td><td align="center">O</td><td></td><td></td></tr></tbody></table>

### <mark style="color:blue;">result</mark> - array\<object>

<table data-full-width="true"><thead><tr><th width="147">필드명</th><th width="141">타입</th><th width="68" align="center">길이</th><th width="108" align="center">필수여부</th><th width="87">기본값</th><th>설명</th></tr></thead><tbody><tr><td><strong><code>agencyKey</code></strong></td><td>string</td><td align="center">18</td><td align="center"></td><td></td><td>대행사 키 입니다.</td></tr><tr><td><strong><code>registerDate</code></strong></td><td>string</td><td align="center"></td><td align="center"></td><td></td><td>대행사키 등록일시 입니다.</td></tr><tr><td><strong><code>userName</code></strong></td><td>string</td><td align="center"></td><td align="center"></td><td></td><td>대행사키 발급을 실행한 대상자 이름입니다.</td></tr><tr><td><strong><code>isSync</code></strong></td><td>boolean</td><td align="center"></td><td align="center"></td><td></td><td>대행사키 이통사 동기화 완료 여부</td></tr></tbody></table>

### ❖ response body sample

{% tabs %}
{% tab title="200" %}

```
{
    "code": "20000000",
    "desc": null,
    "result": [
        {
            "agencyKey": "AK.4bN4SIZ92g3ch3G",
            "userName": "system",
            "registerDate": "2024-06-10T11:26:16.000+09",
            "isSync": true
        }
    ],
    "status": 200
}
```

{% endtab %}

{% tab title="401" %}

```
{
    "error": {
        "code": "61003",
        "message": "Invalid token"
    },
    "status": 401
}

{
    "error": {
        "code": "61005",
        "message": "Invalid client id"
    },
    "status": 401
}

{
    "error": {
        "code": "61007",
        "message": "not allowed IP. unregistered 0.0.0.0"
    },
    "status": 401
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
error code는 [RCS Biz Center - Response body error code](/rbc-api/error_code.md#rcs-biz-center-response-body-error-code) 참조
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.rcsbizcenter.com/rbc-api/agency/get_agency_key.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
