필터

👍

Try It!

Try out the App API for your Branch App via the API reference here.

Overview

The App API allows developers to view and make updates to an existing Branch app configuration to better support workflows for

전제 조건

In order to access the App API, you need to have completed the following:

  1. Created a Branch Dashboard

권한인증

Calls to the App API require both your Branch Key and Branch Secret parameter to be passed with each request. This can be obtained through the Branch Dashboard Account Settings.

1270

Learn more about your Branch Account Profile here.

API Usage

Get Current Branch App Config

엔드 포인트

GET /v1/app/{branch_key}?branch_secret={branch_secret}
Content-Type: application/json
Body: JSON parameters
Host: api2.branch.io

Request Parameters

파라미터설명필수
branch_keyThe Branch key of the originating app; from your Branch Settings Dashboard
branch_secretThe Branch secret if the originating app; from your Branch Settings Dashboard

Example Request/Response

curl GET 'https://api2.branch.io/v1/app/{branch_key}?branch_secret={branch_secret}'
{
    branch_key: "the app key",
    branch_secret: "the app secret",
    creation_date : "date app was created",

    app_name: "name of the app",

    dev_name: "main contact name",
    dev_email: "main contact email",
    dev_phone_number: "main contact phone",

    android_app: "whether an Android app is enabled",
    android_url: "url of Android store, or namespace (com.android.myapp)",
    android_uri_scheme: "the Android URI scheme",
    android_package_name: "the Android package name",
    sha256_cert_fingerprints: "the SHA256 fingerprints for App Links",
    android_app_links_enabled: "whether App Links are enabled",

    ios_app: "whether an iOS app is enabled",
    ios_url: "url of iOS store, or app id (id512451233)",
    ios_uri_scheme:  "the iOS URI scheme",
    ios_store_country: "the country code of the app, default to US",
    ios_bundle_id: "the iOS bundle ID",
    ios_team_id: "the iOS Team ID",
    universal_linking_enabled: "whether Universal Links are enabled",

    fire_url: "the redirect on Fire phones",
    windows_phone_url: "the redirect on Windows phones",
    blackberry_url: "The redirect on Blackberry phones",
    web_url: "backup website if URLs are null",
    default_desktop_url: "the default desktop redirect, or null if set to hosted SMS",

    short_url_domain: "white labeled domain for short links",

    text_message: "text message to use, {{ link }} will be replaced with short link",

    og_app_id: "optional default Open Graph (OG) app id",
    og_title: "optional default OG title",
    og_image_url: "optional default OG image URL",
    og_description: "optional default OG description",
    
    deepview_desktop: "the current deepview selected for the desktop platform",
    deepview_ios: "the current deepview selected for the iOS platform",
    deepview_android: "the current deepview selected for the Android platform",
  }

Update Branch App Config

엔드 포인트

PUT /v1/app/{branch_key}
Content-Type: application/json
Body: JSON parameters
Host: api2.branch.io

Request Parameters

파라미터설명필수
branch_secretThe Branch secret if the originating app; from your Branch Settings Dashboard
app_name앱 이름 (최대 255자).아니오
dev_name주요 담당 개발자 이름 (최대 255자).아니오
dev_email주요 담당 개발자 이메일 (최대 255자).
android_urlThe url of the Android store, or package name (com.android.myapp). Note that to set a fallback URL for Android instead, you must also set android_app to 2.아니오
android_uri_scheme안드로이드 URI scheme.아니오
ios_urliOS 스토어의 URL 또는 앱 ID (id512451233)아니오
ios_uri_schemeiOS URI scheme.아니오
ios_store_country앱의 국가 코드, 기본값은 US (최대 255자)입니다.아니오
web_urlURL이 널(null)인 경우 웹 사이트를 백업합니다.아니오
text_messagetext-me 기능에 사용할 문자 메시지 {{ link }}는 짧은 링크 (최대 255자)로 대체됩니다.아니오
og_app_id기본 오픈 그래프(Open Graph, OG) 앱 ID (최대 255자).아니오
og_title링크와 함께 사용할 기본 OG 제목 (최대 255자).아니오
og_description링크와 함께 사용할 기본 OG 설명 (최대 255자).아니오
og_image_url링크와 함께 사용할 기본 OG 이미지 URL (최대 255자).아니오

Example Request/Response

curl --request PUT \
     --url 'https://api2.branch.io/v1/app/key_live_XXXX' \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "branch_secret": "secret_live_XXXX",
   "dev_email": "[email protected]",
   "og_title": "New App Title"
}
'
{
    branch_key: "the app key",
    branch_secret: "the app secret",
    creation_date : "date app was created",

    app_name: "name of the app",

    dev_name: "main contact name",
    dev_email: "main contact email",
    dev_phone_number: "main contact phone",

    android_url: "url of Android store, or namespace (com.android.myapp)",
    android_uri_scheme: "the Android URI scheme",

    ios_url: "url of iOS store, or app id (id512451233)",
    ios_uri_scheme:  "the iOS URI scheme",
    ios_store_country: "the country code of the app, default to US",

    web_url: "backup website if URLs are null",

    short_url_domain: "white labeled domain for short links",

    text_message: "text message to use, {{ link }} will be replaced with short link",

    og_app_id: "optional default Open Graph (OG) app id",
    og_title: "optional default OG title",
    og_image_url: "optional default OG image URL",
    og_description: "optional default OG description"
  }