Identity Cloud

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.
  1. Get an access token for the realm that is using the custom domain. See Get an access token.

  2. 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"
            }
        }
    ]
An access token is not needed to to view the assetlinks.json file as it is publicly accessible.
  1. 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"
        }
    }
  1. Get an access token for the realm that is using the custom domain. See Get an access token.

  2. 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"
            }
        }
    ]
Copyright © 2010-2023 ForgeRock, all rights reserved.