Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add v1.1 info in "Using REST API for updating Add-ons" #3269

Merged
merged 56 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
43c6690
Update using-addons-api.md
bhuvanapriyap Sep 17, 2024
d0dcd1a
Merge branch 'main' into v-bhuvana
mikehoffms Sep 18, 2024
8f8baf8
Writer/Editor pass
mikehoffms Sep 18, 2024
75b20b5
full name of API each time
mikehoffms Sep 18, 2024
64ef655
improve v2 intro section
mikehoffms Sep 18, 2024
09e1c96
add todo cmts re: v2 p.c. UI
mikehoffms Sep 18, 2024
05166a6
rewrite h2 Before you begin
mikehoffms Sep 18, 2024
10c49ea
clarify "auto update n/a for P.C. extensions"
mikehoffms Sep 18, 2024
26a2c2a
state scenario of applicability
mikehoffms Sep 18, 2024
fb86547
externally installed extension
mikehoffms Sep 18, 2024
3ec3781
acknowledge externally installed extensions
mikehoffms Sep 18, 2024
edc24c4
normalize leading spaces
mikehoffms Sep 18, 2024
b56265e
norm indents more
mikehoffms Sep 18, 2024
1643cfa
try 4 lead spaces in 1st section 55-71
mikehoffms Sep 18, 2024
a1c9526
desc: & See also h2
mikehoffms Sep 18, 2024
721162f
link to Partner Center. add See also h2 section
mikehoffms Sep 18, 2024
c924fb8
norm'ize Check Status step list
mikehoffms Sep 18, 2024
b8948a8
(CD)
mikehoffms Sep 19, 2024
ec35d2c
link trim
mikehoffms Sep 19, 2024
d24902d
link trim 2
mikehoffms Sep 19, 2024
e1c51d4
Rewrite "Before you begin" headings
mikehoffms Sep 19, 2024
3af0345
Merge branch 'main' into v-bhuvana
mikehoffms Sep 19, 2024
ac59727
typo an Microsoft account
mikehoffms Sep 19, 2024
726b0df
change v2 to v1.1
mikehoffms Sep 19, 2024
4fa992f
tabsets
mikehoffms Sep 19, 2024
6e1520f
key not keys; isolate v1.1 from v1 info; ClientID
mikehoffms Sep 19, 2024
a75eab5
resolved todos
mikehoffms Sep 19, 2024
489899b
p.c. 1.1 pngs, tabsets for code in Using
mikehoffms Sep 19, 2024
26c0144
true code in v1.1 tabs
mikehoffms Sep 19, 2024
0366023
linkfix, add Update to title
mikehoffms Sep 19, 2024
69f67db
shrink "v1.1 vs v1" section, link Overview to h2s
mikehoffms Sep 19, 2024
4f20802
state the png shows initial v1 UI
mikehoffms Sep 19, 2024
5a0995b
token vs url
mikehoffms Sep 19, 2024
7d7fbb8
anchor link fix
mikehoffms Sep 19, 2024
9629da2
reseq title now that it's long
mikehoffms Sep 19, 2024
d7ecfd6
add "update" to Ref article title
mikehoffms Sep 19, 2024
79797c1
clarify lead-in re: access token & url
mikehoffms Sep 19, 2024
957d3b0
title for Using more like for Ref article
mikehoffms Sep 19, 2024
cff19aa
not "cover"; clarif "opt in"
mikehoffms Sep 19, 2024
2d61c95
convert mid-sentence lists
mikehoffms Sep 19, 2024
e155b55
corrected list of endpoints abilities
mikehoffms Sep 19, 2024
6144242
endpoint root
mikehoffms Sep 19, 2024
7ecd579
missing colon X-Client, break curl into 2-3 lines
mikehoffms Sep 20, 2024
575cd08
$varName, hints, tips, links
mikehoffms Sep 20, 2024
842a6dd
revert auth token url to v2.0
mikehoffms Sep 20, 2024
d0d1edb
comment out unclear paragraph
mikehoffms Sep 20, 2024
39b45c2
$varName consistency, keep /v1/
mikehoffms Sep 20, 2024
038a50e
Merge branch 'main' into v-bhuvana
mikehoffms Sep 20, 2024
bd18124
PUT -> POST
mikehoffms Sep 20, 2024
e0e81cc
azure to entra 404
mikehoffms Sep 20, 2024
0cac749
{operationID} to $operationID in send lines
mikehoffms Sep 20, 2024
39a14c5
Update released-features.md
mikehoffms Sep 23, 2024
33c7923
not publish extension. CI/CD expansion
mikehoffms Sep 23, 2024
b967f24
the api --> this api
mikehoffms Sep 23, 2024
b7d9106
restructure Intro
mikehoffms Sep 23, 2024
d8dd8b8
clarify opt in to API key UX
mikehoffms Sep 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,40 @@ ms.subservice: extensions
ms.date: 05/05/2023
---
# Alternative ways to distribute an extension
<!-- alts:
# Use alternative installation methods
per https://developer.chrome.com/docs/extensions/how-to/distribute/install-extensions
-->

Generally, extensions are distributed through the Microsoft Edge Add-ons website. There are some scenarios where developers may need to distribute extensions using alternate methods. For example:

1. The extension is associated with other software, and it should be installed together with the rest of the bundled software.

1. Network administrators want to distribute an extension throughout their organization.

Extensions that aren't loaded from the Edge Add-ons store are referred to as externally installed extensions. The following are alternate methods of distributing externally installed extensions:
Extensions that aren't loaded from the Edge Add-ons store are referred to as _externally installed extensions_. The following are alternate methods of distributing externally installed extensions:

* Use the Windows registry (Windows only).
* Use a preferences JSON file (macOS and Linux).
* Use the Windows registry (Windows only).
* Use a preferences JSON file (macOS and Linux).

These approaches are described below.

See also:
* [Set an externally installed extension to automatically update](../publish/auto-update.md)


<!-- ====================================================================== -->
## Before you begin
## Gather initial information

Make sure that you publish your extension in the Microsoft Edge Add-ons website, or package a `.crx` file and ensure that it installs successfully on your computer. If you install the `.crx` file using the `update_url`, make sure you can go to your extension at that URL.
Make sure that you publish your extension in the Microsoft Edge Add-ons website<!-- todo: but Intro says: "Generally, extensions are distributed through the Microsoft Edge Add-ons website. There are some scenarios where developers may need to distribute extensions using alternate methods." -->, or package a `.crx` file and ensure that it installs successfully on your computer. If you install the `.crx` file using the `update_url`, make sure you can go to your extension at that URL.
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved

Also, make sure that you have the following information:

* The file path of the `.crx` file, or the `update_url` of your extension.
* The file path of the `.crx` file, or the `update_url` of your extension.

* The version of your extension. The version information is available in your manifest file, or in Microsoft Edge at `edge://extensions` after you load the packed extension.
* The version of your extension. The version information is available in your manifest file, or in Microsoft Edge at `edge://extensions` after you load the packed extension.

* The ID of your extension. The ID information is available in Microsoft Edge at `edge://extensions` after you load the packed extension.
* The ID of your extension. The ID information is available in Microsoft Edge at `edge://extensions` after you load the packed extension.

The following examples use `1.0` as the version, and `aaaaaaaabbbbbbbbccccccccdddddddd` for the ID.

Expand All @@ -45,24 +52,23 @@ The following examples use `1.0` as the version, and `aaaaaaaabbbbbbbbccccccccdd

To distribute your extension using the Windows registry:

1. Find or create the following key in the registry:
* 32-bit Windows: `HKEY_LOCAL_MACHINE\Software\Microsoft\Edge\Extensions`
* 64-bit Windows: `HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Edge\Extensions`
1. Find or create the following key in the registry:
* 32-bit Windows: `HKEY_LOCAL_MACHINE\Software\Microsoft\Edge\Extensions`
* 64-bit Windows: `HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Edge\Extensions`

1. Create a new key, or folder, under **Extensions** with the same name as the ID of your extension. For example, create the key with the name `aaaaaaaabbbbbbbbccccccccdddddddd`.
1. Create a new key, or folder, under **Extensions** with the same name as the ID of your extension. For example, create the key with the name `aaaaaaaabbbbbbbbccccccccdddddddd`.

1. In the **Extensions** key, create the `update_url` property, and set the value to `https://edge.microsoft.com/extensionwebstorebase/v1/crx`. The `update_url` property points to the `.crx` file of your extension in the Microsoft Edge Add-ons website.
1. In the **Extensions** key, create the `update_url` property, and set the value to `https://edge.microsoft.com/extensionwebstorebase/v1/crx`. The `update_url` property points to the `.crx` file of your extension in the Microsoft Edge Add-ons website.

```json
{
"update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"
}
```
```json
{
"update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"
}
```

> [!NOTE]
> If you want to install an extension from the Chrome Web Store, set the value of `update_url` to `https://clients2.google.com/service/update2/crx`.
If you want to install an extension from the Chrome Web Store, set the value of `update_url` to `https://clients2.google.com/service/update2/crx`.

1. In Microsoft Edge, go to `edge://extensions`, and then verify that your extension is listed.
1. In Microsoft Edge, go to `edge://extensions`, and then verify that your extension is listed.


<!-- ====================================================================== -->
Expand All @@ -78,62 +84,62 @@ To distribute your extension by using a preferences JSON file:

1. Depending on your operating system, save the JSON file to one of the following folders:

* **macOS**
* User-specific: `~USERNAME/Library/Application Support/Microsoft Edge/External Extensions/`
* For all users: `/Library/Application Support/Microsoft/Edge/External Extensions/`
* **macOS**
* User-specific: `~USERNAME/Library/Application Support/Microsoft Edge/External Extensions/`
* For all users: `/Library/Application Support/Microsoft/Edge/External Extensions/`

To prevent unauthorized users from installing extensions for all users, make sure your extension preferences file is read-only.
To prevent unauthorized users from installing extensions for all users, make sure your extension preferences file is read-only.

Also make sure that the following conditions are met:
Also make sure that the following conditions are met:

* Every directory in the path is owned by the user root.
* Every directory in the path is assigned to the `admin` or `wheel` group.
* Every directory in the path isn't `world` writable.
* The path must be free of symbolic links.
* Every directory in the path is owned by the user root.
* Every directory in the path is assigned to the `admin` or `wheel` group.
* Every directory in the path isn't `world` writable.
* The path must be free of symbolic links.

* **Linux**
* User-specific: `~/.config/microsoft-edge/External Extensions/`
* For all users: `/usr/share/microsoft-edge/extensions/`
* **Linux**
* User-specific: `~/.config/microsoft-edge/External Extensions/`
* For all users: `/usr/share/microsoft-edge/extensions/`

1. Depending on your scenario, copy the appropriate code that follows, into your preferences JSON file.

* Applies to Linux only. If you install from a file, specify the location and version in `external_crx` and `external_version`:
* Applies to Linux only. If you install from a file, specify the location and version in `external_crx` and `external_version`:

```json
{
"external_crx": "/home/share/extension.crx",
"external_version": "1.0"
}
```
```json
{
"external_crx": "/home/share/extension.crx",
"external_version": "1.0"
}
```

* Applies to macOS and Linux. If you install from an `update_url`, specify the update URL in `external_update_url`.
* Applies to macOS and Linux. If you install from an `update_url`, specify the update URL in `external_update_url`.

Copy the following code into your preferences JSON file when installing from local `.crx` files on Linux only:
Copy the following code into your preferences JSON file when installing from local `.crx` files on Linux only:

```json
{
"external_update_url": "http://myhost.com/mytestextension/updates.xml"
}
```
```json
{
"external_update_url": "http://myhost.com/mytestextension/updates.xml"
}
```

* Copy the following code to your preferences JSON file when installing from the Microsoft Edge Add-ons website on macOS and Linux:
* Copy the following code to your preferences JSON file when installing from the Microsoft Edge Add-ons website on macOS and Linux:

```json
{
"external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"
}
```
```json
{
"external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx"
}
```

1. To install extensions for specific locales, list the supported locales, in `supported_locales`.

You can specify parent locales, to install your extension for all language locales that use that parent. For example, when using the parent locale `en`, your extension installs for all English locales, such as `en-US`, `en-GB`, and so on. When users change their locale in their browser, externally installed extensions are uninstalled. To install your extension for _any_ locale, don't use `supported_locales`.

```json
{
"external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx",
"supported_locales": [ "en", "fr", "de" ]
}
```
```json
{
"external_update_url": "https://edge.microsoft.com/extensionwebstorebase/v1/crx",
"supported_locales": [ "en", "fr", "de" ]
}
```

1. Verify that your extension is installed in Microsoft Edge, by going to `edge://extensions`.

Expand All @@ -147,8 +153,8 @@ To update your extension to a new version, update the `version` string in the ex

You may need to uninstall externally installed extensions, which were installed as part of a bundle of software that was previously installed on the machine. To uninstall your extension, remove your preferences JSON file or remove the key from the registry.


See also:
* [Set an externally installed extension to automatically update](../publish/auto-update.md)
* [Manifest file format for extensions](../getting-started/manifest-format.md)


Expand All @@ -160,6 +166,24 @@ The policies for `ExtensionInstallForcelist`, block list, and `ExtensionSettings
If the `BlockExternalExtensions` policy is set to `Not Configured` or `Disabled`, that doesn't have any effect. If the `BlockExternalExtensions` policy is set to `Enabled`, external extension installation (by third party software) is prevented.


<!-- ====================================================================== -->
## See also
<!-- all links in article -->

* [Set an externally installed extension to automatically update](../publish/auto-update.md)
* [Manifest file format for extensions](../getting-started/manifest-format.md)

Microsoft Edge Enterprise docs:
* [Microsoft Edge - Policies](/deployedge/microsoft-edge-policies)
* [ExtensionInstallForcelist](/deployedge/microsoft-edge-policies#extensioninstallforcelist)
* [ExtensionInstallSources](/deployedge/microsoft-edge-policies#extensioninstallsources)
* [ExtensionSettings](/deployedge/microsoft-edge-policies#extensionsettings)
* [BlockExternalExtensions](/deployedge/microsoft-edge-policies#blockexternalextensions)

Chrome Extensions docs:
mikehoffms marked this conversation as resolved.
Show resolved Hide resolved
* [Use alternative installation methods](https://developer.chrome.com/docs/extensions/how-to/distribute/install-extensions)<!-- todo: maybe remove link after update present article. = [here] link below -->


<!-- ====================================================================== -->
> [!NOTE]
> Portions of this page are modifications based on work created and [shared by Google](https://developers.google.com/terms/site-policies) and used according to terms described in the [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0). The original page is found [here](https://developer.chrome.com/docs/extensions/how-to/distribute/install-extensions).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,4 +133,4 @@ This work is licensed under a [Creative Commons Attribution 4.0 International Li

* [Chrome Extensions API reference for Manifest V2](https://developer.chrome.com/docs/extensions/mv2/reference/)
* [Chrome Extensions API reference for Manifest V3](https://developer.chrome.com/docs/extensions/reference/api/)
* [Using the Microsoft Edge Add-ons REST API](../publish/api/using-addons-api.md) - to update an extension at the Microsoft Edge Add-ons website.
* [Using the REST API for updating Microsoft Edge Add-ons](../publish/api/using-addons-api.md) - to update an extension at the Microsoft Edge Add-ons website.
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ The goal for this tutorial is to build a Microsoft Edge extension, starting with
* Adding icons.
* Opening a default pop-up dialog.


<!-- ====================================================================== -->
## Before you begin

To test out the completed extension that you are building in this tutorial, download the source code from [MicrosoftEdge-Extensions repo > extension-getting-started-part1](https://github.com/microsoft/MicrosoftEdge-Extensions/tree/main/Extension%20samples/extension-getting-started-part1/part1). The source code has been updated from Manifest V2 to Manifest V3.
If you want to test out the completed extension that you are building in this tutorial, download the source code from [MicrosoftEdge-Extensions repo > extension-getting-started-part1](https://github.com/microsoft/MicrosoftEdge-Extensions/tree/main/Extension%20samples/extension-getting-started-part1/part1). The source code has been updated from Manifest V2 to Manifest V3.


<!-- ====================================================================== -->
Expand Down
6 changes: 3 additions & 3 deletions microsoft-edge/extensions-chromium/landing/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -177,15 +177,15 @@ landingContent:
- text: Update a Microsoft Edge extension
url: ../publish/update-extension.md

- text: Set an extension to automatically update
- text: Set an externally installed extension to automatically update
url: ../publish/auto-update.md

- text: Using the Microsoft Edge Add-ons REST API
- text: Using the REST API for updating Microsoft Edge Add-ons
url: ../publish/api/using-addons-api.md

- linkListType: reference
links:
- text: REST API Reference for Microsoft Edge Add-ons
- text: REST API Reference for updating Microsoft Edge Add-ons
url: ../publish/api/addons-api-reference.md

# =============================================================================
Expand Down
Loading