Upload an Android assetlinks.json
file
To help you integrate your Android apps with Identity Cloud, you can upload an Android assetlinks.json to your Identity Cloud environment. The assetlinks.json
file lets your website declare an association with your Android apps.
To upload the file, use the the /.well-known/assetlinks.json
endpoint in the REST API. The endpoint is accessed using a custom domain.
Make sure that you have already set up a custom domain for each environment and realm where you need to upload an Android assetlinks.json file.
|
Upload or replace an assetlinks.json
file
-
Get an access token for the realm that is using the custom domain. Refer to Get an access token for more information.
-
Upload or replace the
assetlinks.json
file:Show request
$ curl \ --request PUT 'https://<custom-domain-fqdn>/.well-known/assetlinks.json' \(1) --header 'Authorization: Bearer <access-token>' \(2) --header 'Content-Type: application/json' \ --data-raw '[(3) { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ]'
1 Replace <custom-domain-fqdn> with your custom domain, for example id.mycompany.com
.2 Replace <access-token> with the access token. 3 Replace the example assetlinks.json JSON content with your own JSON content. Show response
[ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ]
Verify an assetlinks.json
file
An access token is not needed to to view the assetlinks.json file as it is publicly accessible.
|
-
View the
assetlinks.json
file using a GET request:Show request
$ curl \ --request GET 'https://<custom-domain-fqdn>/.well-known/assetlinks.json'(1)
1 Replace <custom-domain-fqdn> with your custom domain, for example id.mycompany.com
.Show response
{ "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } }
Delete an assetlinks.json
file
-
Get an access token for the realm that is using the custom domain. Refer to Get an access token.
-
Delete the
assetlinks.json
file:Show request
$ curl \ --request DELETE 'https://<custom-domain-fqdn>/.well-known/assetlinks.json' \(1) --header 'Authorization: Bearer <access-token>' \(2)
1 Replace <custom-domain-fqdn> with your custom domain, for example id.mycompany.com
.2 Replace <access-token> with the access token. Show response
[ { "relation": [ "delegate_permission/common.handle_all_urls", "delegate_permission/common.get_login_creds" ], "target": { "namespace": "web", "site": "https://id.mycompany.com" } } ]
website URLs to immediately open the corresponding content in your Android app, without requiring the user to select the app. Android App Links use the Digital Asset Links API to establish trust that your app has been approved by the website to automatically open links for that domain