Home Arrow Icon Knowledge base Arrow Icon Global Arrow Icon How do I authenticate my DeepL API account for use in Google Sheets


How do I authenticate my DeepL API account for use in Google Sheets


To authenticate your DeepL API account for use in Google Sheets, follow these steps:

1. Create a DeepL API Account: First, ensure you have a DeepL API account. If you only have a regular DeepL account, you need to create a separate API account. You can find the option to create an API account by logging out of your regular account and then signing up for an API account on the DeepL website.

2. Obtain Your DeepL API Key:
- Log in to your DeepL API account.
- Navigate to the "Account" section.
- Find the "Developers" tab and click on it.
- Click on "Create a new authentication key" to generate a new key. Copy this key as you won't be able to view it again after closing the page[2][9].

3. Securely Store Your API Key: It's crucial to keep your API key confidential. Do not share it or use it in publicly distributed code.

4. Install the SheetsL Add-on in Google Sheets:
- Open your Google Sheet.
- Go to the "Extensions" menu and select "Add-ons."
- Search for "SheetsL" and install it.

5. Set Up SheetsL with Your DeepL API Key:
- After installing SheetsL, go back to the "Extensions" menu and select "SheetsL" > "Settings" > "Set Auth Key."
- Enter your DeepL API authentication key in the provided field[1].

6. Set Your Target Language:
- Still in the SheetsL settings, go to "Set Language."
- You will need to enter the language codes for both your source and target languages. You can leave the source language blank to use DeepL's auto-detection feature[1].

7. Alternative Method Using Apps Script:
- If you prefer not to use the SheetsL add-on, you can integrate DeepL directly using Google Apps Script.
- Open your Google Sheet and go to "Extensions" > "Apps Script."
- Create a new script file named `DeepL.gs` and paste the script from the GitHub example into it[4].
- Modify the script by replacing the placeholder with your DeepL API authentication key on the specified line.
- Save the script and use the custom functions provided in the script for translation[4].

By following these steps, you should be able to authenticate your DeepL API account and use it within Google Sheets for translation tasks.

Citations:
[1] https://www.scriptable-assets.page/add-ons/sheetsl/
[2] https://docs.aicontentlabs.com/articles/deepl-api-key/
[3] https://cloud.google.com/sensitive-data-protection/docs/auth
[4] https://github.com/DeepLcom/google-sheets-example
[5] https://learn.microsoft.com/en-us/connectors/deepl/
[6] https://stackoverflow.com/questions/67485395/google-sheets-custom-function-to-translate-with-deepl-api-not-working-as-expecte
[7] https://webapps.stackexchange.com/questions/149026/integrate-deepl-with-google-sheets
[8] https://www.deepl.com/en/features/sso
[9] https://developers.deepl.com/docs/getting-started/auth
[10] https://support.deepl.com/hc/en-us/articles/12209715872156-Authentication-key-for-CAT-tools