# Re-authenticate and upload an extension overriding conflicts Re-authenticates the user and uploads an extension, overriding any existing conflict. Requires user password for verification. ## Endpoints **POST** `/bsp/api/v1/bmp/extensions/override` ## Request URL ``` https://{serverurl}/bsp/api/v1/bmp/extensions/override ``` `{serverurl}`: https://www.manageengine.com/products/desktop-central/oauth-authentication-endpoint-domain.html ## Scope ``` DesktopCentralCloud.BrowserManager.CREATE ``` ## Header ``` Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52 ``` ## Request Parameters ### Request Headers - **Accept** (string) — Mandatory `application/json` - **Content-Type** (string) — Mandatory `application/json` ### Query Parameters - **zapikey** (string) ### Request Body **Content-Type:** `application/json` **Type:** JSON object Request body for re-authenticating and uploading an extension with conflict override. #### Attributes - **userPassword** (string) — Optional User password for re-authentication verification - **app_id** (string) — Optional Webstore application identifier - **type** (string) — Optional Extension source type - **browser_type** (string) — Optional Values: - `1` = Chrome - `2` = Firefox - `3` = IE - `5` = Edge - `31` = Ulaa - `1024` = Chromium - **xpi_url** (string) — Optional URL to Firefox XPI package - **file_id** (integer) — Optional File identifier for inhouse extension packages - **platform_type** (string) — Optional Platform type filter - **allowed_permissions** (array) — Optional List of permission names to allow ## Sample Request ### Curl ```bash curl --request POST \ --url https://appdomain/bsp/api/v1/bmp/extensions/override \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52' \ --header 'Content-Type: application/json' \ --data '{}' ``` ### Java ```java import java.net.URI; import java.net.http.HttpClient; import java.net.http.HttpRequest; import java.net.http.HttpResponse; import java.io.IOException; import java.net.http.HttpTimeoutException; public class Main { public static void main(String[] args) { HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://appdomain/bsp/api/v1/bmp/extensions/override")) .header("Content-Type", "application/json") .header("Accept", "application/json") .header("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") .method("POST", HttpRequest.BodyPublishers.ofString("{}")) .build(); HttpResponse response = HttpClient.newHttpClient() .send(request, HttpResponse.BodyHandlers.ofString()); System.out.println(response.body()); } } ``` ### Python ```python import http.client conn = http.client.HTTPSConnection("appdomain") payload = "{}" headers = { 'Content-Type': "application/json", 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52" } conn.request("POST", "/bsp/api/v1/bmp/extensions/override", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8")) ``` ### Deluge ```javascript headersMap = Map(); headersMap.put("Accept", "application/json"); headersMap.put("Content-Type", "application/json"); data = Map(); response = invokeUrl [ url: "https://appDomain/bsp/api/v1/bmp/extensions/override" type: POST headers: headersMap body: data connection: connection_name ] info response; ``` ### PowerShell ```powershell $headers=@{} $headers.Add("Content-Type", "application/json") $headers.Add("Accept", "application/json") $headers.Add("Authorization", "Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52") $response = Invoke-WebRequest ` -Uri 'https://appdomain/bsp/api/v1/bmp/extensions/override' ` -Method POST ` -Headers $headers ` -ContentType 'application/json' ` -Body '{}' ``` ## Sample Request Body ```json { "userPassword": "********", "platform_type": -1, "browser_type": 1, "file_id": 0, "type": "web_store", "app_id": "abcdefghijklmnop", "allowed_permissions": [ "tabs", "storage" ], "xpi_url": "" } ``` ## Response Parameters ### HTTP 200 **Response Body:** `application/json` **Type:** JSON object Extension profile response after override. #### Attributes - **extension_id** (integer) Unique identifier of the extension profile - **extension_name** (string) Display name of the extension - **extension_description** (string) Description of the extension - **platform_type** (string) Platform type - **latest_version** (string) Latest version number - **latest_published_version** (string) Latest published version number - **extension_payloads** (array) Extension payload configurations - **payload_type** (string) Payload type identifier. `64120` for extensions - **extension_payload_id** (string) Unique identifier of the extension payload - **extension_details** (object) Extension metadata - **installsource** (string) `1` = webstore, `2` = sideloaded, `3` = inhouse - **browser_type** (string) `1` = Chrome, `2` = Firefox, `5` = Edge - **img_file** (string) Extension icon/logo filename - **description** (string) Extension description - **extn_type** (string) Extension source type: `web_store` or `inhouse` - **shortname** (string) Short identifier name - **version** (string) Extension version string - **extensionname** (string) Extension name from the manifest - **homepageurl** (string) Extension homepage URL - **crx_path** (string) Path to the CRX/XPI extension package - **permissions** (array) Permission names - **updateurl** (string) Extension update check URL - **id** (string) Webstore or internal extension ID - **extension_logo_id** (string) Logo asset identifier - **allowed_permissions** (array) Allowed permission names - **binary_id** (string) Binary record identifier - **update** (boolean) True when the extension was updated by overriding ### HTTP 400 **Response Body:** `application/json` - **error_description** (string) Error message indicating invalid username or password ### HTTP 401 **Response Body:** `application/json` - **errorCode** (long) Unauthorized error code: credentials missing, expired, or invalid - **errorMsg** (string) Authentication failure reason ### HTTP 403 **Response Body:** `application/json` - **errorCode** (long) Error code indicating insufficient permissions - **errorMsg** (string) Message indicating insufficient privileges to access this resource ### HTTP 429 **Response Body:** `application/json` - **errorCode** (long) Rate limit error code returned when the API call reached threshold - **errorMsg** (string) Rate limit exceeded message with retry guidance ### HTTP 500 **Response Body:** `application/json` - **error_description** (string) Error message describing the server failure - **error_code** (string) Error code for internal server errors ## Sample Responses ### HTTP 200 — Extension overridden ```json { "extension_id": 100, "platform_type": 1, "latest_version": 2, "extension_name": "My Extension", "latest_published_version": 1, "update": true, "extension_description": "Extension description", "extension_payloads": [ { "payload_type": "64120", "extension_payload_id": 101, "extension_details": { "installsource": "1", "browser_type": "1", "img_file": "icon16.png", "description": "Extension description", "extn_type": "web_store", "shortname": "My Extension", "version": "2.0.0", "extensionname": "My Extension", "homepageurl": "https://example.com", "crx_path": "..\\webapps\\DesktopCentral\\bsp\\client-data\\1\\ManagedExtensions\\3", "permissions": [ "Tabs", "Storage" ], "updateurl": "https://clients2.google.com/service/update2/crx", "id": "abcdefghijklmnop", "extension_logo_id": "601", "allowed_permissions": [ "tabs", "storage" ] }, "binary_id": "601" } ] } ``` ### HTTP 400 — Invalid credentials ```json { "error_description": "desktopcentral.common.login.invalid_username_password" } ``` ### HTTP 401 — Unauthorized ```json { "errorCode": "UNAUTHORIZED", "errorMsg": "You are not authorized to perform this action" } ``` ### HTTP 403 — Forbidden ```json { "errorCode": "FORBIDDEN", "errorMsg": "You do not have permission to access this resource" } ``` ### HTTP 429 — Rate limit exceeded ```json { "errorCode": "RATE_LIMIT_EXCEEDED", "errorMsg": "You have exceeded the maximum number of API calls. Please try again later." } ``` ### HTTP 500 — Server error ```json { "error_description": "Internal Server error, Please try again in a moment.", "error_code": "COM0004" } ``` ## Possible HTTP Status Codes - `200` - `400` - `401` - `403` - `429` - `500` ## Rate Limiting - **Duration:** 1 minute - **Threshold:** 60 - **Lock period:** 5 minutes **Duration** – Time window for the threshold. **Threshold** – Number of API calls allowed within the specified duration. **Lock Period** – Wait time before consecutive API requests.