Navigation

Fix Google Cloud Translation

Enable the Translation API to make dictionary work

Current Problem: 403 Forbidden

Error: "Request failed with status code 403"

Cause: The Google Cloud Translation API is not enabled in your GCP project, or the service account doesn't have permission to use it.

This means:

  • Your credentials (GOOGLE_CLOUD_CREDENTIALS) are valid ✅
  • Authentication is working ✅
  • But the Translation API is not enabled in your project ❌
Step-by-Step Fix (5 Minutes)
STEP 1

Go to Google Cloud Console

Open the Translation API page for your project

STEP 2

Select Your Project

⚠️ Make sure you're in the RIGHT project!

The project should match the one in your GOOGLE_CLOUD_CREDENTIALS secret. Look at the top of the Google Cloud Console page and select the correct project.

STEP 3

Enable the API

Click the big blue "ENABLE" button on the Translation API page.

It should take only a few seconds to enable. You'll see a confirmation message.

STEP 4

Verify Service Account Permissions

Make sure your service account has permission to use the Translation API.

Required Role:

Cloud Translation API User

Find your service account email (from GOOGLE_CLOUD_CREDENTIALS) and make sure it has this role, or use Editor role for simplicity.

STEP 5

Test It!

Go back to the Simple Dictionary page and try translating "hello" again.

Good News: Translation API is FREE!

Google Cloud Translation API offers:

  • 500,000 characters FREE per month (more than enough for development)
  • No credit card required for the free tier
  • Fast, accurate neural machine translation
  • Supports 100+ languages

💡 Pro Tip:

Even after enabling, if you get billing errors, you might need to enable billing on your GCP project. But the free tier should be more than enough for this app!

Quick Links