Chargetrip Tile Service with React Native and Mapbox
An introduction to the Chargetrip Tile Service and the caveats of integrating it into a React Native mobile application.Read more
When working with the Chargetrip API, your keys can be visible to anyone who makes an effort to look for it. That is why we recommend adding a layer of restrictions to build secure applications and prevent unauthorized use.
When configuring new projects, creating applications or editing applications you can set up your security. You can use HTTP referrer, Android fingerprint and iOS bundle identifier restrictions. By default it's set to use no restrictions. Be aware you can only set one restriction type per application ID.
A HTTP referrer allows restriction to URLs that can use an application ID /
x-app-id. This is useful when building any type of web application. You can add as many URLs to a single application as you would like.
Here are some examples of URLs that you can allow to set up a referrer:
To restrict the use of an application ID on Android, you will need to provide your application identifier and debug / release certificate fingerprint. To use this restriction, you will need to send your identifier and fingerprint with every request by using the
Your application identifier can be found in your modules
build.gradle file. To obtain your release or debug fingerprint use any of the following commands;
keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android
keytool -list -v -keystore "%USERPROFILE%\\.android\\debug.keystore" -alias androiddebugkey -storepass android -keypass android
keytool -list -v -keystore your_keystore_name -alias your_alias_name
An iOS bundle identifier can be used to restrict the use of an application ID /
x-app-identifier on any iOS application. To use this restriction, you will need to send your bundle identifier with every request by using the
The bundle identifier is a unique identifier within the Apple ecosystem and uses a reverse domain notation. Here is an example of such identifier;
To look up your identifier navigate to
project > targets > general in your Xcode project.