![]() If you ever need to rotate YOUR_MAPBOX_ACCESS_TOKE, you will need to update the token value in your R.strings.xml file. If you would like to manage your public access token this way, open your project's R.strings.xml file and add the following string resource, replacing YOUR_MAPBOX_ACCESS_TOKEN with your public Mapbox API token: YOUR_MAPBOX_ACCESS_TOKEN Many of the examples and code snippets on this site assume your token is stored in a file in your project with other string values. There are many ways to configure your public access token. MAPBOX_DOWNLOADS_TOKEN=YOUR_SECRET_MAPBOX_ACCESS_TOKEN Add your secret token to your gradle.properties file:.You can read more about Gradle properties in the official Gradle documentation. Once you have found or created the file, its path should be «USER_HOME»/.gradle/gradle.properties. The folder is located at «USER_HOME»/.gradle. Find or create a gradle.properties file in your Gradle user home folder.To avoid exposing your secret token, add it as an environment variable: Once this configuration step has been completed, you will be able to reference your credentials in other parts of your app. Instead, you should store them somewhere safe on your computer and take advantage of Gradle properties to make sure they're only added when your app is compiled. You should not expose these access tokens in publicly-accessible source code where unauthorized users might find them. Since Dash SDK is in private preview state you will need to contact us to request access to a private version of the SDK.The token you've created is a secret token, which means you will only have one opportunity to save it somewhere secure.Click the Create token button at the bottom of the page to create your token.From the token creation page, give your token a name and make sure the box next to the Downloads:Read scope is checked. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |