> For the complete documentation index, see [llms.txt](https://docs.mapbox.com/android/ja/navigation/llms.txt)

# Access Private Preview Modules

Complete the standard [Get Started](https://docs.mapbox.com/android/ja/navigation/guides/install/) guide first. Some Nav SDK modules are in private preview and are only available to accounts that Mapbox has explicitly enabled — if you need one of those, follow the additional steps below afterward.

> **Note: Get access to a private preview module**
> 
> Some modules are private preview and require Mapbox to enable access for your account before you can use them. [Contact us](https://www.mapbox.com/support/) to request access.

## Configure a secret token

Once Mapbox has enabled a private preview module for your account, configure a secret access token to authenticate downloads of that module.

### Step 1: Create a secret token

A [secret access token](https://docs.mapbox.com/help/dive-deeper/access-tokens/#secret-tokens) is required to download the SDK dependencies in your Android project. This token is used by gradle to authenticate with the Mapbox maven server where the SDK packages are hosted.

To create a secret token, follow these steps:

1.  Go to your account's [tokens page](https://console.mapbox.com/account/access-tokens/).
2.  Click the **Create a token** button.
3.  Name your token, for this example we've used *InstallTokenAndroid*.
4.  Scroll down to the **Secret Scope** section and check the `Downloads:Read` scope box.
5.  Click the **Create token** button at the bottom of the page to create your token.
6.  Enter your password to confirm the creation of your token.
7.  Now, you'll be returned to your account's [tokens page](https://console.mapbox.com/account/access-tokens/), where you can copy your created token. Note, this token is a *secret token*, which means you will only have one opportunity to copy it, so **save this token somewhere secure**.

Your browser doesn't support HTML5 video. Open [link to the video](https://docs.mapbox.com/android/ja/android/ja/assets/medias/create-secret-token-compressed-823407693dc7c7f3351fb5c23377d5bf.mp4).

> **Note (warning): Protect secret access tokens**
> 
> You should not expose secret access tokens in publicly-accessible source code where unauthorized users might find them. Instead, you should store them somewhere safe on your computer and take advantage of [Gradle properties](https://docs.gradle.org/current/userguide/build_environment.html#sec:gradle_configuration_properties) to make sure they're only added when your app is compiled.

### Step 2: Configure your secret token

Next, add your secret token to your global `gradle.properties` file. The global `gradle.properties` file is located in your Gradle user home folder, but is also available in Android Studio's project explorer under `Gradle Scripts/gradle.properties (Global Properties)`

If you don't have a `gradle.properties` file, create one. Add your secret token to the `gradle.properties` file as shown below, replacing the placeholder `YOUR_SECRET_MAPBOX_ACCESS_TOKEN` with your secret token.

```text
MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_MAPBOX_ACCESS_TOKEN
```

Your secret token is now configured and will be used to authenticate with the Mapbox maven server when you add the SDK dependency to your project.

## Add your token to the Mapbox Maven repository

Private preview modules are downloaded from the same Mapbox Maven repository you already added in [Get Started](https://docs.mapbox.com/android/ja/navigation/guides/install/#add-sdk-dependencies) — update that `maven {...}` block in your `settings.gradle.kts` file to authenticate with the secret token you configured:

**Groovy**

Title: `settings.gradle`

```groovy
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        // Mapbox Maven repository
        maven {
            url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
            authentication {
                basic(BasicAuthentication)
            }
            credentials {
                // Do not change the username below.
                // This should always be `mapbox` (not your username).
                username = "mapbox"
                // Use the secret token you stored in gradle.properties as the password
                password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").get()
            }
        }
    }
}
```

**Kotlin**

Title: `settings.gradle.kts`

```kotlin
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        // Mapbox Maven repository
        maven {
            url = uri("https://api.mapbox.com/downloads/v2/releases/maven")
            authentication {
                create<BasicAuthentication>("basic")
            }
            credentials {
                // Do not change the username below.
                // This should always be `mapbox` (not your username).
                username = "mapbox"
                // Use the secret token you stored in gradle.properties as the password
                password = providers.gradleProperty("MAPBOX_DOWNLOADS_TOKEN").get()
            }
        }
    }
}
```

## Add the dependency

Add the private preview module to your module-level `build.gradle.kts` file the same way you would any other Nav SDK dependency, using the artifact ID from the module's own guide. For example, installing the NOA module looks like this:

**Groovy**

Title: `build.gradle`

```groovy
dependencies {
  ...
    implementation "com.mapbox.navigationcore:noa:3.31.1"
  ...
}
```

**Kotlin**

Title: `build.gradle.kts`

```kotlin
dependencies {
  ...
    implementation("com.mapbox.navigationcore:noa:3.31.1")
  ...
}
```

See the module's own guide for its exact dependency coordinates.