# Get an app

Returns a particular app as specified by the App ID.

Endpoint: GET /v1/projects/{project_id}/apps/{app_id}
Version: 1.0
Security: Basic, oAuth2

## Security:

  - `Basic` (unknown)
    http basic

  - `oAuth2` (unknown)
    oauth2

## Path parameters:

  - `project_id` (string, required)
    The unique ID of the project. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).

  - `app_id` (string, required)
    The unique ID of the app. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).

## Response 200:

  - `200` (unknown)
    A successful response.

## Response 200 fields (application/json):

  - `channel_credentials` (array)

  - `channel_credentials.callback_secret` (string)
    The secret used to verify the channel callbacks
for channels which support callback verification.
The callback verification is not needed for Sinch-managed
channels because the callbacks are not leaving
Sinch internal networks.
Max length is 256 characters.
Note: leaving channel_callback_secret empty for channels with
callback verification will disable the verification.

  - `channel_credentials.channel` (string)
    The identifier of the channel you want to include. Must be one of the enum values.
    Enum: "SMS", "RCS", "WHATSAPP", "MMS", "KAKAOTALK", "KAKAOTALKCHAT", "VIBERBM", "LINE", "INSTAGRAM", "MESSENGER", "WECHAT", "TELEGRAM", "APPLEBC"

  - `channel_credentials.state` (object)
    State of the channel credentials integration.

  - `channel_credentials.state.status` (string, required)
    Status of the channel credentials integration
    Enum: "PENDING", "ACTIVE", "FAILING"

  - `channel_credentials.state.description` (string)
    Description in case the integration fails

  - `channel_credentials.channel_known_id` (string)
    Additional identifier set by the channel that represents an specific id used by the channel.

  - `channel_credentials.credential_ordinal_number` (integer)
    The ordinal number of the credential. This field is used when the application supports multiple credential integrations per channel. Currently, this is only applicable to the `LINE` channel. For other channels, this value will always be set to `0`. In the case in which there are multiple credential integrations per channel on a single app, this field must have a unique value for each multi-credential channel entry.

  - `channel_credentials.static_bearer` (object)
    This object is required for channels which use a bearer-type of credential for authentication.

  - `channel_credentials.static_bearer.claimed_identity` (string, required)
    The claimed identity for the channel.

  - `channel_credentials.static_bearer.token` (string, required)
    The static bearer token for the channel.

  - `channel_credentials.static_token` (object)
    This object is required for channels which use a static token credential for authentication.

  - `channel_credentials.static_token.token` (string, required)
    The static token for the channel.

  - `channel_credentials.mms_credentials` (object)
    If you are including the MMS channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.mms_credentials.account_id` (string, required)
    MMS Account ID.

  - `channel_credentials.mms_credentials.api_key` (string, required)
    MMS API Key.

  - `channel_credentials.mms_credentials.basic_auth` (object)
    It consists of a username and a password.

  - `channel_credentials.mms_credentials.basic_auth.password` (string, required)
    Basic auth password.

  - `channel_credentials.mms_credentials.basic_auth.username` (string, required)
    Basic auth username.

  - `channel_credentials.kakaotalk_credentials` (object)
    If you are including the KakaoTalk channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.kakaotalk_credentials.kakaotalk_plus_friend_id` (string, required)
    KakaoTalk Business Channel ID.

  - `channel_credentials.kakaotalk_credentials.kakaotalk_sender_key` (string, required)
    KakaoTalk Sender Key.

  - `channel_credentials.telegram_credentials` (object)
    If you are including the Telegram Bot channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.telegram_credentials.token` (string, required)
    The token for the Telegram bot to which you are connecting.
    Example: {{TELEGRAM_BOT_TOKEN}}

  - `channel_credentials.line_credentials` (object)
    If the `channel` property is set to `LINE` for this entry of the `channel_credentials` array, you must include either the `line_credentials` object or the `line_enterprise_credentials` object in the entry as well.

  - `channel_credentials.line_credentials.token` (string, required)
    The token for the LINE channel to which you are connecting.
    Example: {{LINE_TOKEN}}

  - `channel_credentials.line_credentials.secret` (string, required)
    The secret for the LINE channel to which you are connecting.
    Example: {{LINE_SECRET}}

  - `channel_credentials.line_credentials.is_default` (boolean)
    When an app contains multiple LINE or LINE Enterprise credentials, one of the credentials needs to be defined as the default. Setting this property to `true` marks the corresponding credentials as the default credentials.

  - `channel_credentials.line_enterprise_credentials` (object)
    If the `channel` property is set to `LINE` for this entry of the `channel_credentials` array, you must include either the `line_credentials` object or the `line_enterprise_credentials` object in the entry as well.

  - `channel_credentials.line_enterprise_credentials.is_default` (boolean)
    When an app contains multiple LINE or LINE Enterprise credentials, one of the credentials needs to be defined as the default. Setting this property to `true` marks the corresponding credentials as the default credentials.

  - `channel_credentials.line_enterprise_credentials.line_japan` (object)

  - `channel_credentials.line_enterprise_credentials.line_japan.token` (string, required)
    The token for the LINE channel to which you are connecting.
    Example: {{LINE_TOKEN}}

  - `channel_credentials.line_enterprise_credentials.line_japan.secret` (string, required)
    The secret for the LINE channel to which you are connecting.
    Example: {{LINE_SECRET}}

  - `channel_credentials.wechat_credentials` (object)
    If you are including the WeChat channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.wechat_credentials.app_id` (string, required)
    The AppID(Developer ID) for the WeChat channel to which you are connecting.
    Example: {{WECHAT_APPID}}

  - `channel_credentials.wechat_credentials.app_secret` (string, required)
    The AppSecret(Developer Password) for the WeChat channel to which you are connecting.
    Example: {{WECHAT_APPSECRET}}

  - `channel_credentials.wechat_credentials.token` (string, required)
    The Token for the WeChat channel to which you are connecting.
    Example: {{WECHAT_TOKEN}}

  - `channel_credentials.wechat_credentials.aes_key` (string, required)
    The Encoding AES Key for the WeChat channel to which you are connecting.
    Example: {{WECHAT_AESKEY}}

  - `channel_credentials.instagram_credentials` (object)
    If you are including the INSTAGRAM channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.instagram_credentials.token` (string, required)
    The static token.

  - `channel_credentials.instagram_credentials.business_account_id` (string)
    Required if using the Sinch Facebook App.

  - `channel_credentials.applebc_credentials` (object)
    If you are including the AppleBC channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.applebc_credentials.business_chat_account_id` (string, required)
    The ID that identifies a Business Chat Account (BCA).

  - `channel_credentials.applebc_credentials.merchant_id` (string)
    Merchant ID, required if our client wants to use Apple Pay.

  - `channel_credentials.applebc_credentials.apple_pay_certificate_reference` (string)
    Certificate reference, required if our client wants to use Apple Pay.

  - `channel_credentials.applebc_credentials.apple_pay_certificate_password` (string)
    Certificate password, required if our client wants to use Apple Pay.

  - `channel_credentials.kakaotalkchat_credentials` (object)
    If you are including the KakaoTalkChat channel in the `channel_identifier` property, you must include this object.

  - `channel_credentials.kakaotalkchat_credentials.kakaotalk_plus_friend_id` (string, required)
    Kakaotalk Plus friend ID.

  - `channel_credentials.kakaotalkchat_credentials.api_key` (string)
    InfoBank API KEY.

  - `conversation_metadata_report_view` (string)
    NONE - Omit metadata.
FULL - Include all metadata assigned to the conversation.
    Enum: "NONE", "FULL"

  - `display_name` (string)
    The display name for the app.
    Example: Sinch Conversation API Demo App 001

  - `id` (string)
    The ID of the app. You can find this on the [Sinch Dashboard](https://dashboard.sinch.com/convapi/apps).
    Example: {APP_ID}

  - `rate_limits` (object)

  - `rate_limits.inbound` (integer)
    The number of inbound messages/events we process per second,
from underlying channels to the app.  The default rate limit is 25.

  - `rate_limits.outbound` (integer)
    The number of messages/events we process per second, from the
app to the underlying channels. Note that underlying channels may have other
rate limits.  The default rate limit is 25.

  - `rate_limits.webhooks` (integer)
    The rate limit of callbacks sent to the webhooks registered
for the app. Note that if you have multiple webhooks with shared triggers,
multiple callbacks will be sent out for each triggering event. The default rate limit is 25.

  - `retention_policy` (object)
    The retention policy configured for the app. For more information about retention policies, see [Retention Policy](https://developers.sinch.com/docs/conversation/keyconcepts/#retention-policy).

  - `retention_policy.retention_type` (string)
    Enum: "MESSAGE_EXPIRE_POLICY", "CONVERSATION_EXPIRE_POLICY", "PERSIST_RETENTION_POLICY"

  - `retention_policy.ttl_days` (integer)
    Optional. The days before a message or conversation is eligible for deletion.
Default value is 180. The ttl_days value has no effect when retention_type
is `PERSIST_RETENTION_POLICY`. The valid values for this field are [1 - 3650].
Note that retention cleanup job runs once every twenty-four hours
which can lead to delay i.e., messages and conversations are not deleted on
the minute they become eligible for deletion.

  - `dispatch_retention_policy` (object)
    The retention policy configured for messages in [Dispatch Mode](https://developers.sinch.com/docs/conversation/processing-modes/). Currently only `MESSAGE_EXPIRE_POLICY` is available. For more information about retention policies, see [Retention Policy](https://developers.sinch.com/docs/conversation/keyconcepts/#retention-policy).

  - `dispatch_retention_policy.retention_type` (string)
    Enum: "MESSAGE_EXPIRE_POLICY"

  - `dispatch_retention_policy.ttl_days` (integer)
    Optional. The days before a message is eligible for deletion. The valid range is `[0 - 7]`. In the case of a `0` day TTL, messages aren't stored at all.
Note the retention cleanup job runs once every twenty-four hours, so messages are not deleted on the minute they become eligible for deletion.

  - `processing_mode` (string)
    Whether or not Conversation API should store contacts and conversations for the app. For more information, see [Processing Modes](https://developers.sinch.com/docs/conversation/processing-modes/).
    Enum: "CONVERSATION", "DISPATCH"

  - `smart_conversation` (object)
    This object is required for apps that subscribe to Smart Conversations features.

  - `smart_conversation.enabled` (boolean)
    Set to true to allow messages processed by this app to be analyzed by Smart Conversations.

  - `queue_stats` (object)

  - `queue_stats.outbound_size` (integer)
    The current size of the App's MT queue.

  - `queue_stats.outbound_limit` (integer)
    The limit of the App's MT queue. The default limit is 500000 messages.

  - `callback_settings` (object)
    This object contains additional settings related to callback processing.

  - `callback_settings.secret_for_overridden_callback_urls` (string)
    Optional. Secret can be used to sign contents of delivery receipts for a message that was sent with the default callback URL overridden (using the [`callback_url` field](https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Messages/#tag/Messages/operation/Messages_SendMessage!path=callback_url&t=request)). You can then use the secret to verify the signature.

  - `delivery_report_based_fallback` (object)
    This object contains additional settings related to [delivery report based fallback](https://developers.sinch.com/docs/conversation/keyconcepts/#delivery-report-base-message-fallback). Note that this is **paid** functionality.

  - `delivery_report_based_fallback.enabled` (boolean)
    Optional. A flag specifying whether this app has enabled fallback message delivery upon no positive delivery report. This feature is applicable only to messages which are sent to a recipient with more than one channel identity. Identities must be defined on channels which support at least the 'DELIVERED' message state. **Please note that this functionality requires payment.**

  - `delivery_report_based_fallback.delivery_report_waiting_time` (integer)
    Optional. The time, in seconds, after which a message without a positive delivery report will fallback to the next channel.

  - `message_retry_settings` (object)
    This object contains settings related to message retry mechanism.

  - `message_retry_settings.retry_duration` (integer)
    The maximum duration, in seconds, during which the system will retry sending a message in the event of a temporary processing failure. Time is counted after the first message processing failure. At least one retry is guaranteed. Subsequent retry instances are randomized with exponential backoff. If the next retry timestamp exceeds the configured time, one final retry will be performed on the cut-off time. The valid values for this field are [30 - 3600].

## Response 400:

  - `400` (unknown)
    Malformed request. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 400 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 401:

  - `401` (unknown)
    Incorrect credentials. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 403:

  - `403` (unknown)
    Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 403 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 500:

  - `500` (unknown)
    Correct credentials but you don't have access to the requested resource. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 500 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

## Response 501:

  - `501` (unknown)
    Something went wrong on our end, try again with exponential back-off. See [common error responses](https://developers.sinch.com/docs/conversation/api-reference/#common-error-responses) for more information.

## Response 501 fields (application/json):

  - `error` (object)

  - `error.code` (integer)

  - `error.details` (array)

  - `error.details.type_url` (string)

  - `error.details.value` (string)

  - `error.message` (string)

  - `error.status` (string)

