### API Response Example (Success) Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Example of a successful API response, indicating a 200 OK status and a JSON body with a success code and empty data. ```http HTTPS/1.1 200 OK ``` ```json { "message": "OK", "code": 0, "data": {} } ``` -------------------------------- ### Get Lead List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of leads. ```APIDOC ## GET /open_oceanengine_labels/v1/lead/list ### Description Retrieves a list of leads. ### Method GET ### Endpoint /open_oceanengine_labels/v1/lead/list ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of leads per page. ### Response #### Success Response (200) - **leads** (array) - A list of lead objects. - **lead_id** (string) - The ID of the lead. - **name** (string) - The name of the lead. - **phone** (string) - The phone number of the lead. ``` -------------------------------- ### Get Product List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of products available for advertising. ```APIDOC ## GET /open_oceanengine_labels/v1/product/list ### Description Retrieves a list of products. ### Method GET ### Endpoint /open_oceanengine_labels/v1/product/list ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of products per page. ### Response #### Success Response (200) - **products** (array) - A list of product objects. - **product_id** (string) - The ID of the product. - **product_name** (string) - The name of the product. ``` -------------------------------- ### Get Form List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of form components. ```APIDOC ## GET /open_oceanengine_labels/v1/component/form/list ### Description Retrieves a list of form components. ### Method GET ### Endpoint /open_oceanengine_labels/v1/component/form/list ### Response #### Success Response (200) - **forms** (array) - A list of form objects. - **form_id** (string) - The ID of the form. - **form_name** (string) - The name of the form. ``` -------------------------------- ### Get Quick App Info Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves information about quick apps. ```APIDOC ## GET /open_oceanengine_labels/v1/asset/quick_app/list ### Description Retrieves a list of quick apps. ### Method GET ### Endpoint /open_oceanengine_labels/v1/asset/quick_app/list ### Response #### Success Response (200) - **quick_apps** (array) - A list of quick app objects. - **app_id** (string) - The ID of the quick app. - **app_name** (string) - The name of the quick app. ``` -------------------------------- ### Get Recommended Video Materials Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves recommended video materials for use in campaigns. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/recommended_video_materials ### Description Retrieves recommended video materials for use in campaigns. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/recommended_video_materials ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **video_materials** (array) - A list of recommended video material objects. ``` -------------------------------- ### Get Marketing Preview QR Code Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Generates a QR code for marketing preview. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/marketing_preview_qrcode ### Description Generates a QR code for marketing preview. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/marketing_preview_qrcode ### Parameters #### Query Parameters - **campaign_id** (string) - Required - The ID of the campaign. ### Response #### Success Response (200) - **qrcode_url** (string) - The URL of the generated QR code. ``` -------------------------------- ### Get Smart Phone List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of smart phone components. ```APIDOC ## GET /open_oceanengine_labels/v1/component/smart_phone/list ### Description Retrieves a list of smart phone components. ### Method GET ### Endpoint /open_oceanengine_labels/v1/component/smart_phone/list ### Response #### Success Response (200) - **smart_phones** (array) - A list of smart phone objects. - **smart_phone_id** (string) - The ID of the smart phone component. - **phone_number** (string) - The phone number associated with the component. ``` -------------------------------- ### Prepare and Send POST Request Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Prepares arguments in JSON format and sends a POST request using the previously defined post function. This example specifically targets the OAuth2 refresh token endpoint. ```php $app_id = APP_ID; $appid = APPID; $secret = SECRET; $refresh_token = REFRESH_TOKEN; /* Args in JSON format */ $my_args = sprintf("{\"app_id\": \"%s\", \"appid\": \"%s\", \"secret\": \"%s\", \"refresh_token\": \"%s\"}", $app_id, $appid, $secret, $refresh_token); echo post($my_args); ``` -------------------------------- ### Get Industry List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of industries. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/industries ### Description Retrieves a list of industries. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/industries ### Response #### Success Response (200) - **industries** (array) - A list of industry objects. - **industry_id** (string) - The ID of the industry. - **industry_name** (string) - The name of the industry. ``` -------------------------------- ### Get ByteDance Mini Program List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of ByteDance mini programs. ```APIDOC ## GET /open_oceanengine_labels/v1/asset/bytedance/mini_program/list ### Description Retrieves a list of ByteDance mini programs. ### Method GET ### Endpoint /open_oceanengine_labels/v1/asset/bytedance/mini_program/list ### Response #### Success Response (200) - **mini_programs** (array) - A list of ByteDance mini program objects. - **app_id** (string) - The ID of the mini program. - **app_name** (string) - The name of the mini program. ``` -------------------------------- ### Get Project List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of marketing projects based on specified filters. ```APIDOC ## GET /open_oceanengine_labels/v1/project/list ### Description Retrieves a list of marketing projects. ### Method GET ### Endpoint /open_oceanengine_labels/v1/project/list ### Parameters #### Query Parameters - **account_id** (string) - Optional - Filter projects by account ID. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of projects per page. ### Response #### Success Response (200) - **projects** (array) - A list of project objects. - **project_id** (string) - The ID of the project. - **project_name** (string) - The name of the project. - **budget** (number) - The budget of the project. - **start_time** (string) - The start date of the project. - **end_time** (string) - The end date of the project. ``` -------------------------------- ### Get Keyword List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of keywords for a given advertising unit. ```APIDOC ## GET /open_oceanengine_labels/v1/keyword/list ### Description Retrieves a list of keywords. ### Method GET ### Endpoint /open_oceanengine_labels/v1/keyword/list ### Parameters #### Query Parameters - **unit_id** (string) - Required - The ID of the unit. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of keywords per page. ### Response #### Success Response (200) - **keywords** (array) - A list of keyword objects. - **keyword_id** (string) - The ID of the keyword. - **keyword_text** (string) - The text of the keyword. ``` -------------------------------- ### Get Video Material Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves video materials associated with an account. ```APIDOC ## GET /open_oceanengine_labels/v1/material/video/list ### Description Retrieves video materials. ### Method GET ### Endpoint /open_oceanengine_labels/v1/material/video/list ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of materials per page. ### Response #### Success Response (200) - **materials** (array) - A list of video material objects. - **material_id** (string) - The ID of the video material. - **url** (string) - The URL of the video. ``` -------------------------------- ### Get Diagnosis Suggestions Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves diagnosis suggestions for campaign optimization. ```APIDOC ## GET /open_oceanengine_labels/v1/diagnosis/suggestions ### Description Retrieves diagnosis suggestions for campaign optimization. ### Method GET ### Endpoint /open_oceanengine_labels/v1/diagnosis/suggestions ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **suggestions** (array) - A list of diagnosis suggestion objects. ``` -------------------------------- ### Get Comment List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of comments. ```APIDOC ## GET /open_oceanengine_labels/v1/comment/list ### Description Retrieves a list of comments. ### Method GET ### Endpoint /open_oceanengine_labels/v1/comment/list ### Parameters #### Query Parameters - **item_id** (string) - Required - The ID of the item the comments are associated with. ### Response #### Success Response (200) - **comments** (array) - A list of comment objects. ``` -------------------------------- ### Get Recommended Behavior/Interest Keywords Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves recommended keywords for behavior and interest targeting. ```APIDOC ## GET /open_oceanengine_labels/v1/behavior_interest/recommended_keywords ### Description Retrieves recommended keywords for behavior and interest targeting. ### Method GET ### Endpoint /open_oceanengine_labels/v1/behavior_interest/recommended_keywords ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **keywords** (array) - A list of recommended keyword objects. ``` -------------------------------- ### Get Card Coupon List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of card coupon components. ```APIDOC ## GET /open_oceanengine_labels/v1/component/card_coupon/list ### Description Retrieves a list of card coupon components. ### Method GET ### Endpoint /open_oceanengine_labels/v1/component/card_coupon/list ### Response #### Success Response (200) - **coupons** (array) - A list of coupon objects. - **coupon_id** (string) - The ID of the coupon. - **coupon_name** (string) - The name of the coupon. ``` -------------------------------- ### Get Unit List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of advertising units for a given project. ```APIDOC ## GET /open_oceanengine_labels/v1/unit/list ### Description Retrieves a list of advertising units. ### Method GET ### Endpoint /open_oceanengine_labels/v1/unit/list ### Parameters #### Query Parameters - **project_id** (string) - Required - The ID of the project. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of units per page. ### Response #### Success Response (200) - **units** (array) - A list of unit objects. - **unit_id** (string) - The ID of the unit. - **unit_name** (string) - The name of the unit. - **budget** (number) - The budget of the unit. ``` -------------------------------- ### Get WeChat Mini Program List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of WeChat mini programs. ```APIDOC ## GET /open_oceanengine_labels/v1/asset/wechat/mini_program/list ### Description Retrieves a list of WeChat mini programs. ### Method GET ### Endpoint /open_oceanengine_labels/v1/asset/wechat/mini_program/list ### Response #### Success Response (200) - **mini_programs** (array) - A list of WeChat mini program objects. - **app_id** (string) - The ID of the mini program. - **app_name** (string) - The name of the mini program. ``` -------------------------------- ### Get Account Assets Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of assets associated with an account. ```APIDOC ## GET /open_oceanengine_labels/v1/asset/account/list ### Description Retrieves a list of assets associated with an account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/asset/account/list ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **assets** (array) - A list of asset objects. - **asset_id** (string) - The ID of the asset. - **asset_name** (string) - The name of the asset. ``` -------------------------------- ### Get Image Material Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves image materials associated with an account. ```APIDOC ## GET /open_oceanengine_labels/v1/material/image/list ### Description Retrieves image materials. ### Method GET ### Endpoint /open_oceanengine_labels/v1/material/image/list ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of materials per page. ### Response #### Success Response (200) - **materials** (array) - A list of image material objects. - **material_id** (string) - The ID of the image material. - **url** (string) - The URL of the image. ``` -------------------------------- ### Get Available Deep Optimization Methods Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of available deep optimization methods for marketing campaigns. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/deep_optimization_methods ### Description Retrieves a list of available deep optimization methods for marketing campaigns. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/deep_optimization_methods ### Response #### Success Response (200) - **optimization_methods** (array) - A list of deep optimization method objects. - **method_id** (string) - The ID of the optimization method. - **method_name** (string) - The name of the optimization method. ``` -------------------------------- ### Get Unit Diagnosis Suggestions Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves diagnosis suggestions for advertising units. ```APIDOC ## GET /open_oceanengine_labels/v1/diagnosis/unit_suggestions ### Description Retrieves diagnosis suggestions for advertising units. ### Method GET ### Endpoint /open_oceanengine_labels/v1/diagnosis/unit_suggestions ### Parameters #### Query Parameters - **unit_id** (string) - Required - The ID of the advertising unit. ### Response #### Success Response (200) - **suggestions** (array) - A list of unit diagnosis suggestion objects. ``` -------------------------------- ### Get DMP Audience List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of DMP audience packages. ```APIDOC ## GET /open_oceanengine_labels/v1/dmp/audience/list ### Description Retrieves a list of DMP audience packages. ### Method GET ### Endpoint /open_oceanengine_labels/v1/dmp/audience/list ### Response #### Success Response (200) - **audiences** (array) - A list of audience package objects. - **audience_id** (string) - The ID of the audience package. - **audience_name** (string) - The name of the audience package. ``` -------------------------------- ### Get Available Optimization Goals Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of available optimization goals for marketing campaigns. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/optimization_goals ### Description Retrieves a list of available optimization goals for marketing campaigns. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/optimization_goals ### Response #### Success Response (200) - **optimization_goals** (array) - A list of optimization goal objects. - **goal_id** (string) - The ID of the optimization goal. - **goal_name** (string) - The name of the optimization goal. ``` -------------------------------- ### Get Comment Statistics Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves statistical metrics for comments. ```APIDOC ## GET /open_oceanengine_labels/v1/comment/statistics ### Description Retrieves statistical metrics for comments. ### Method GET ### Endpoint /open_oceanengine_labels/v1/comment/statistics ### Parameters #### Query Parameters - **item_id** (string) - Required - The ID of the item the comments are associated with. ### Response #### Success Response (200) - **statistics** (object) - An object containing comment statistics. ``` -------------------------------- ### Get Blocked Words Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of blocked words. ```APIDOC ## GET /open_oceanengine_labels/v1/comment/block_words ### Description Retrieves a list of blocked words. ### Method GET ### Endpoint /open_oceanengine_labels/v1/comment/block_words ### Response #### Success Response (200) - **words** (array) - A list of blocked words. ``` -------------------------------- ### Get Blocked User List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of blocked users. ```APIDOC ## GET /open_oceanengine_labels/v1/comment/block_users ### Description Retrieves a list of blocked users. ### Method GET ### Endpoint /open_oceanengine_labels/v1/comment/block_users ### Response #### Success Response (200) - **users** (array) - A list of blocked user objects. - **user_id** (string) - The ID of the blocked user. ``` -------------------------------- ### Get ChuanShanJia Traffic Package Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves ChuanShanJia traffic packages. ```APIDOC ## GET /open_oceanengine_labels/v1/traffic_package/chuanshanjia/list ### Description Retrieves ChuanShanJia traffic packages. ### Method GET ### Endpoint /open_oceanengine_labels/v1/traffic_package/chuanshanjia/list ### Response #### Success Response (200) - **traffic_packages** (array) - A list of ChuanShanJia traffic package objects. ``` -------------------------------- ### Get Account Daily Budget Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves the daily budget for a given advertising account. ```APIDOC ## GET /open_oceanengine_labels/v1/budget/get_account_daily_budget ### Description Retrieves the daily budget for a specified advertising account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/budget/get_account_daily_budget ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **data** (object) - The budget information. - **budget** (number) - The daily budget amount. - **last_update_time** (string) - The timestamp of the last budget update. ``` -------------------------------- ### Get Orange Site List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of sites created with the Orange Site Builder. ```APIDOC ## GET /open_oceanengine_labels/v1/site/orange/list ### Description Retrieves a list of sites created with the Orange Site Builder. ### Method GET ### Endpoint /open_oceanengine_labels/v1/site/orange/list ### Parameters #### Query Parameters - **page** (integer) - Optional - The page number for pagination. - **page_size** (integer) - Optional - The number of sites per page. ### Response #### Success Response (200) - **sites** (array) - A list of site objects. - **site_id** (string) - The ID of the site. - **site_name** (string) - The name of the site. ``` -------------------------------- ### Get WeChat Account Package Details Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves details of a WeChat account package for adding followers. ```APIDOC ## GET /open_oceanengine_labels/v1/component/wechat_follow/package/{package_id} ### Description Retrieves details of a WeChat account package for adding followers. ### Method GET ### Endpoint /open_oceanengine_labels/v1/component/wechat_follow/package/{package_id} ### Parameters #### Path Parameters - **package_id** (string) - Required - The ID of the WeChat account package. ### Response #### Success Response (200) - **package_details** (object) - The details of the WeChat account package. ``` -------------------------------- ### Get Comment Reply List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of replies to a specific comment. ```APIDOC ## GET /open_oceanengine_labels/v1/comment/reply/list ### Description Retrieves a list of replies to a specific comment. ### Method GET ### Endpoint /open_oceanengine_labels/v1/comment/reply/list ### Parameters #### Query Parameters - **comment_id** (string) - Required - The ID of the comment. ### Response #### Success Response (200) - **replies** (array) - A list of reply objects. ``` -------------------------------- ### Get Douyin Authorization Relationship Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves the Douyin authorization relationship for an account. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/douyin_auth_relationship ### Description Retrieves the Douyin authorization relationship for an account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/douyin_auth_relationship ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **authorization_info** (object) - Information about the Douyin authorization relationship. ``` -------------------------------- ### Get DMP Audience Details Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves detailed information about a specific DMP audience package. ```APIDOC ## GET /open_oceanengine_labels/v1/dmp/audience/{audience_id} ### Description Retrieves detailed information about a specific DMP audience package. ### Method GET ### Endpoint /open_oceanengine_labels/v1/dmp/audience/{audience_id} ### Parameters #### Path Parameters - **audience_id** (string) - Required - The ID of the audience package. ### Response #### Success Response (200) - **audience_details** (object) - The detailed information of the audience package. ``` -------------------------------- ### Get Bound Douyin Account Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves information about Douyin accounts bound to the current account. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/bound_douyin_accounts ### Description Retrieves information about Douyin accounts bound to the current account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/bound_douyin_accounts ### Response #### Success Response (200) - **douyin_accounts** (array) - A list of Douyin account objects. - **douyin_id** (string) - The ID of the Douyin account. - **nickname** (string) - The nickname of the Douyin account. ``` -------------------------------- ### Get Custom Report Metrics and Dimensions Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves available metrics and dimensions for creating custom reports. ```APIDOC ## GET /open_oceanengine_labels/v1/report/custom/available ### Description Retrieves the available metrics and dimensions for custom reports. ### Method GET ### Endpoint /open_oceanengine_labels/v1/report/custom/available ### Response #### Success Response (200) - **metrics** (array) - A list of available metrics. - **dimensions** (array) - A list of available dimensions. ``` -------------------------------- ### Get Access Token Source: https://open.oceanengine.com/labels/34 Obtain an Access Token and Refresh Token by using the authorization code received after customer authorization. This token is required to make further API calls to manage customer accounts. ```APIDOC ## POST /open_api/oauth2/access_token/ ### Description Obtain an Access Token and Refresh Token using the authorization code. ### Method POST ### Endpoint https://ad.oceanengine.com/open_api/oauth2/access_token/ ### Parameters #### Request Body - **app_id** (number) - Required - The application ID obtained during developer registration. - **secret** (string) - Required - The secret key for the developer's application. Must correspond to the `app_id`. - **auth_code** (string) - Required - The authorization code provided during the callback after authorization. It is valid for 10 minutes and can only be used once. ### Request Example ```json { "app_id":123456, "secret":"xxxx", "auth_code":"xxxx" } ``` ### Response #### Success Response (200) - **code** (integer) - Indicates the result of the operation. 0 for success. - **message** (string) - The message returned by the server. - **data** (object) - Contains token information. - **access_token** (string) - The access token for API calls. Valid for 24 hours. - **refresh_token** (string) - The refresh token to obtain a new access token. Valid for 30 days. - **advertiser_id** (integer) - The ID of the authorized advertiser. - **advertiser_ids** (array) - A list of advertiser IDs that can be managed with this token. - **expires_in** (integer) - The validity period of the access token in seconds (e.g., 86400 for 24 hours). - **refresh_token_expires_in** (integer) - The validity period of the refresh token in seconds (e.g., 604800 for 30 days). #### Response Example ```json { "code": 0, "message": "", "data": { "access_token": "xxxxx", "refresh_token": "xxxxx", "advertiser_id": 1, "advertiser_ids": [1,2,3], "expires_in": 86400, "refresh_token_expires_in": 604800 } } ``` ``` -------------------------------- ### Get Cloud Image Account Info Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves information about the Cloud Image account associated with a given advertising account. ```APIDOC ## GET /open_oceanengine_labels/v1/cloud_image/account_info ### Description Retrieves information about the Cloud Image account associated with a given advertising account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/cloud_image/account_info ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **cloud_image_account** (object) - Information about the Cloud Image account. - **account_id** (string) - The Cloud Image account ID. - **account_name** (string) - The Cloud Image account name. ``` -------------------------------- ### Create Project Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new marketing project with specified details. ```APIDOC ## POST /open_oceanengine_labels/v1/project/create ### Description Creates a new marketing project. ### Method POST ### Endpoint /open_oceanengine_labels/v1/project/create ### Parameters #### Request Body - **project_name** (string) - Required - The name of the project. - **budget** (number) - Optional - The budget for the project. - **start_time** (string) - Optional - The start date for the project (YYYY-MM-DD). - **end_time** (string) - Optional - The end date for the project (YYYY-MM-DD). ### Response #### Success Response (200) - **project_id** (string) - The ID of the newly created project. ``` -------------------------------- ### Create Product Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new product for advertising. ```APIDOC ## POST /open_oceanengine_labels/v1/product/create ### Description Creates a new product. ### Method POST ### Endpoint /open_oceanengine_labels/v1/product/create ### Parameters #### Request Body - **account_id** (string) - Required - The ID of the advertising account. - **product_name** (string) - Required - The name of the product. - **product_url** (string) - Required - The URL of the product. ### Response #### Success Response (200) - **product_id** (string) - The ID of the newly created product. ``` -------------------------------- ### Create Smart Phone Component Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new smart phone component. ```APIDOC ## POST /open_oceanengine_labels/v1/component/smart_phone/create ### Description Creates a new smart phone component. ### Method POST ### Endpoint /open_oceanengine_labels/v1/component/smart_phone/create ### Parameters #### Request Body - **phone_number** (string) - Required - The phone number to associate with the component. ### Response #### Success Response (200) - **smart_phone_id** (string) - The ID of the newly created smart phone component. ``` -------------------------------- ### Create ByteDance Mini Program Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new ByteDance mini program. ```APIDOC ## POST /open_oceanengine_labels/v1/asset/bytedance/mini_program/create ### Description Creates a new ByteDance mini program. ### Method POST ### Endpoint /open_oceanengine_labels/v1/asset/bytedance/mini_program/create ### Parameters #### Request Body - **app_name** (string) - Required - The name of the mini program. - **app_id** (string) - Required - The unique ID of the mini program. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the mini program was created. ``` -------------------------------- ### Create WeChat Mini Program Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new WeChat mini program. ```APIDOC ## POST /open_oceanengine_labels/v1/asset/wechat/mini_program/create ### Description Creates a new WeChat mini program. ### Method POST ### Endpoint /open_oceanengine_labels/v1/asset/wechat/mini_program/create ### Parameters #### Request Body - **app_name** (string) - Required - The name of the mini program. - **app_id** (string) - Required - The unique ID of the mini program. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the mini program was created. ``` -------------------------------- ### Create Form Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new form component. ```APIDOC ## POST /open_oceanengine_labels/v1/component/form/create ### Description Creates a new form component. ### Method POST ### Endpoint /open_oceanengine_labels/v1/component/form/create ### Parameters #### Request Body - **form_name** (string) - Required - The name of the form. ### Response #### Success Response (200) - **form_id** (string) - The ID of the newly created form. ``` -------------------------------- ### Create Orange Site Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new site using the Orange Site Builder. ```APIDOC ## POST /open_oceanengine_labels/v1/site/orange/create ### Description Creates a new site using the Orange Site Builder. ### Method POST ### Endpoint /open_oceanengine_labels/v1/site/orange/create ### Parameters #### Request Body - **site_name** (string) - Required - The name of the site. - **template_id** (string) - Optional - The ID of the template to use. ### Response #### Success Response (200) - **site_id** (string) - The ID of the newly created site. ``` -------------------------------- ### Create DMP Audience Package Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new DMP audience package. ```APIDOC ## POST /open_oceanengine_labels/v1/dmp/audience/create ### Description Creates a new DMP audience package. ### Method POST ### Endpoint /open_oceanengine_labels/v1/dmp/audience/create ### Parameters #### Request Body - **audience_name** (string) - Required - The name of the audience package. - **data_source_id** (string) - Required - The ID of the data source. ### Response #### Success Response (200) - **audience_id** (string) - The ID of the newly created audience package. ``` -------------------------------- ### Create Card Coupon Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new card coupon component. ```APIDOC ## POST /open_oceanengine_labels/v1/component/card_coupon/create ### Description Creates a new card coupon component. ### Method POST ### Endpoint /open_oceanengine_labels/v1/component/card_coupon/create ### Parameters #### Request Body - **coupon_name** (string) - Required - The name of the coupon. - **coupon_value** (number) - Required - The value of the coupon. ### Response #### Success Response (200) - **coupon_id** (string) - The ID of the newly created coupon. ``` -------------------------------- ### Create Unit Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new advertising unit within a project. ```APIDOC ## POST /open_oceanengine_labels/v1/unit/create ### Description Creates a new advertising unit. ### Method POST ### Endpoint /open_oceanengine_labels/v1/unit/create ### Parameters #### Request Body - **project_id** (string) - Required - The ID of the project to which the unit belongs. - **unit_name** (string) - Required - The name of the unit. - **budget** (number) - Optional - The budget for the unit. ### Response #### Success Response (200) - **unit_id** (string) - The ID of the newly created unit. ``` -------------------------------- ### Get WeChat Account List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of WeChat accounts for adding followers. ```APIDOC ## GET /open_oceanengine_labels/v1/component/wechat_follow/account_list ### Description Retrieves a list of WeChat accounts for adding followers. ### Method GET ### Endpoint /open_oceanengine_labels/v1/component/wechat_follow/account_list ### Response #### Success Response (200) - **wechat_accounts** (array) - A list of WeChat account objects. - **account_id** (string) - The ID of the WeChat account. - **account_name** (string) - The name of the WeChat account. ``` -------------------------------- ### Create Event Asset Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new event asset for conversion tracking. ```APIDOC ## POST /open_oceanengine_labels/v1/asset/event/create ### Description Creates a new event asset for conversion tracking. ### Method POST ### Endpoint /open_oceanengine_labels/v1/asset/event/create ### Parameters #### Request Body - **event_name** (string) - Required - The name of the event. - **asset_id** (string) - Required - The ID of the asset to associate the event with. ### Response #### Success Response (200) - **event_asset_id** (string) - The ID of the newly created event asset. ``` -------------------------------- ### Upload Video Material Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Uploads a video material for advertising. ```APIDOC ## POST /open_oceanengine_labels/v1/material/video/upload ### Description Uploads a video material. ### Method POST ### Endpoint /open_oceanengine_labels/v1/material/video/upload ### Parameters #### Request Body - **account_id** (string) - Required - The ID of the advertising account. - **video_file** (file) - Required - The video file to upload. ### Response #### Success Response (200) - **material_id** (string) - The ID of the uploaded video material. ``` -------------------------------- ### Query Tools Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Queries available tools within the platform. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/query ### Description Queries available tools within the platform. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/query ### Response #### Success Response (200) - **tools** (array) - A list of available tool objects. - **tool_id** (string) - The ID of the tool. - **tool_name** (string) - The name of the tool. ``` -------------------------------- ### Refresh OAuth Token using cURL Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Demonstrates how to refresh an OAuth token using a direct cURL command. This is an alternative to using the PHP functions provided. ```shell curl -H "Access-Token:xxx" -H "Content-Type:application/json" -X POST \ -d '{ "app_id": "APP_ID", "appid": "APPID", "secret": "SECRET", "refresh_token": "REFRESH_TOKEN" }' \ https://api.oceanengine.com/open_api/oauth2/refresh_token/ ``` -------------------------------- ### Create Keyword Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new keyword for an advertising campaign. ```APIDOC ## POST /open_oceanengine_labels/v1/keyword/create ### Description Creates a new keyword. ### Method POST ### Endpoint /open_oceanengine_labels/v1/keyword/create ### Parameters #### Request Body - **unit_id** (string) - Required - The ID of the unit to which the keyword belongs. - **keyword_text** (string) - Required - The text of the keyword. ### Response #### Success Response (200) - **keyword_id** (string) - The ID of the newly created keyword. ``` -------------------------------- ### Build API URL Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Constructs the full API endpoint URL by prepending the base URL to a given path. This function is used internally by the post function. ```php function build_url($path) { return "https://api.oceanengine.com" . $path; } ``` -------------------------------- ### Query Whitelist Capability Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Checks for specific whitelist capabilities available to the account. ```APIDOC ## GET /open_oceanengine_labels/v1/tools/whitelist_capability ### Description Checks for specific whitelist capabilities available to the account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/tools/whitelist_capability ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. - **capability_name** (string) - Required - The name of the capability to check. ### Response #### Success Response (200) - **is_whitelisted** (boolean) - True if the capability is whitelisted, false otherwise. ``` -------------------------------- ### Push DMP Audience to Cloud Image Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Pushes a DMP audience package to a Cloud Image account. ```APIDOC ## POST /open_oceanengine_labels/v1/cloud_image/push_dmp_audience ### Description Pushes a DMP audience package to a Cloud Image account. ### Method POST ### Endpoint /open_oceanengine_labels/v1/cloud_image/push_dmp_audience ### Parameters #### Request Body - **account_id** (string) - Required - The ID of the advertising account. - **audience_id** (string) - Required - The ID of the DMP audience package to push. - **cloud_image_account_id** (string) - Required - The ID of the target Cloud Image account. ### Response #### Success Response (200) - **message** (string) - A confirmation message indicating the audience was pushed. ``` -------------------------------- ### 刷新 Access Token 请求示例 Source: https://open.oceanengine.com/labels/34 使用 `app_id`、`secret` 和 `refresh_token` 调用此接口以刷新 `access_token`。刷新操作会同时获得新的 `access_token` 和 `refresh_token`,且有效期都会重置。 ```curl curl --location --request POST 'https://ad.oceanengine.com/open_api/oauth2/refresh_token/' \ --header 'Content-Type: application/json' \ --data-raw '{ "app_id":123456, "secret":"xxxx", "grant_type":"refresh_token", "refresh_token":"xxxx" }' ``` -------------------------------- ### Create ChuanShanJia Traffic Package Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Creates a new ChuanShanJia traffic package. ```APIDOC ## POST /open_oceanengine_labels/v1/traffic_package/chuanshanjia/create ### Description Creates a new ChuanShanJia traffic package. ### Method POST ### Endpoint /open_oceanengine_labels/v1/traffic_package/chuanshanjia/create ### Parameters #### Request Body - **package_name** (string) - Required - The name of the traffic package. - **budget** (number) - Required - The budget for the traffic package. ### Response #### Success Response (200) - **package_id** (string) - The ID of the newly created traffic package. ``` -------------------------------- ### Query Recommended Douyin Influencers by Category Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves recommended Douyin influencers within a specific category. ```APIDOC ## GET /open_oceanengine_labels/v1/douyin/recommended_influencers ### Description Retrieves recommended Douyin influencers within a specific category. ### Method GET ### Endpoint /open_oceanengine_labels/v1/douyin/recommended_influencers ### Parameters #### Query Parameters - **category_id** (string) - Required - The ID of the Douyin category. ### Response #### Success Response (200) - **influencers** (array) - A list of recommended Douyin influencer objects. ``` -------------------------------- ### Upload Image Material Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Uploads an image material for advertising. ```APIDOC ## POST /open_oceanengine_labels/v1/material/image/upload ### Description Uploads an image material. ### Method POST ### Endpoint /open_oceanengine_labels/v1/material/image/upload ### Parameters #### Request Body - **account_id** (string) - Required - The ID of the advertising account. - **image_file** (file) - Required - The image file to upload. ### Response #### Success Response (200) - **material_id** (string) - The ID of the uploaded image material. ``` -------------------------------- ### 获取 Access Token 返回示例 Source: https://open.oceanengine.com/labels/34 成功获取 `access_token`、`refresh_token`、`advertiser_id` 等信息。`access_token` 有效期为 24 小时,`refresh_token` 有效期为 30 天。 ```json { "code": 0, "message": "", "data": { "access_token": "xxxxx", "refresh_token": "xxxxx", "advertiser_id": 1, "advertiser_ids": [1,2,3], "expires_in": 86400, "refresh_token_expires_in": 604800 } } ``` -------------------------------- ### Query Douyin Account and Category Information Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Queries information about Douyin accounts and their categories. ```APIDOC ## GET /open_oceanengine_labels/v1/douyin/account_category_info ### Description Queries information about Douyin accounts and their categories. ### Method GET ### Endpoint /open_oceanengine_labels/v1/douyin/account_category_info ### Parameters #### Query Parameters - **douyin_id** (string) - Required - The ID of the Douyin account. ### Response #### Success Response (200) - **account_info** (object) - Information about the Douyin account and its category. ``` -------------------------------- ### Query Similar Douyin Accounts Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Queries Douyin accounts similar to a given account. ```APIDOC ## GET /open_oceanengine_labels/v1/douyin/similar_accounts ### Description Queries Douyin accounts similar to a given account. ### Method GET ### Endpoint /open_oceanengine_labels/v1/douyin/similar_accounts ### Parameters #### Query Parameters - **douyin_id** (string) - Required - The ID of the Douyin account. ### Response #### Success Response (200) - **similar_accounts** (array) - A list of similar Douyin account objects. ``` -------------------------------- ### Query Douyin Category List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of Douyin categories. ```APIDOC ## GET /open_oceanengine_labels/v1/douyin/category_list ### Description Retrieves a list of Douyin categories. ### Method GET ### Endpoint /open_oceanengine_labels/v1/douyin/category_list ### Response #### Success Response (200) - **categories** (array) - A list of Douyin category objects. - **category_id** (string) - The ID of the category. - **category_name** (string) - The name of the category. ``` -------------------------------- ### Query Authorized Live Douyin Influencer List Source: https://open.oceanengine.com/labels/34/docs/1696710506097679?origin=left_nav Retrieves a list of Douyin influencers authorized for live streaming. ```APIDOC ## GET /open_oceanengine_labels/v1/douyin/authorized_live_influencers ### Description Retrieves a list of Douyin influencers authorized for live streaming. ### Method GET ### Endpoint /open_oceanengine_labels/v1/douyin/authorized_live_influencers ### Parameters #### Query Parameters - **account_id** (string) - Required - The ID of the advertising account. ### Response #### Success Response (200) - **influencers** (array) - A list of authorized live Douyin influencer objects. ```