/

Get Project Token

A project token is required to use Shield. It links your builds to your ByteHide account, validates your license, and enables cloud features like mapping file storage and stack trace deobfuscation.


Create Your Project

To get your project token, you first need to create a Shield project:

  1. Sign in to ByteHide Cloud
  2. Go to the Projects section ByteHide Shield Create ProjectClick to expand
  3. Click Create Project in the dashboard ByteHide Shield Create ProjectClick to expand
  4. Choose android as your language
  5. Choose Shield in tools
  6. Type the name of your project
  7. Select the groups that will have access to your project

Get Your Token

After creating your project:

  1. Go to your Shield project
  2. In the main view you will see the Project Token box Project TokenClick to expand
  3. Copy your project token

Configure the Token

Option 1: In build.gradle (Development)

Groovy
shield {
    projectToken = "your-project-token"
}

This is the simplest approach for local development. Do not commit tokens to version control.

Set the SHIELD_PROJECT_TOKEN environment variable and reference it in your build:

Groovy
shield {
    projectToken = System.getenv('SHIELD_PROJECT_TOKEN')
}

In your CI environment:

Bash
export SHIELD_PROJECT_TOKEN="your-project-token"
./gradlew assembleRelease

Option 3: gradle.properties (Team Development)

Add the token to your gradle.properties file:

Properties
# gradle.properties (add to .gitignore)
bytehide.shield.token=your-project-token

Reference it in your build.gradle:

Groovy
shield {
    projectToken = project.property('bytehide.shield.token')
}

Add gradle.properties to your .gitignore to keep the token out of version control. Each team member sets their own token locally.


Token Security

  • Never commit project tokens to public repositories
  • Use environment variables in CI/CD pipelines
  • Each project in the Cloud Panel has its own unique token
  • Tokens can be rotated from the Cloud Panel if compromised

What the Token Enables

During each build, Shield uses the token to:

  • Validate your license — Confirms your account has an active plan with available protection quota
  • Register the build — Records build metadata and protection analytics in your Cloud Panel
  • Upload mapping files — Stores the ProGuard-format mapping file for stack trace deobfuscation from the Cloud Panel

Without a valid token, the build will fail with an authentication error.

Previous
Quick Start