-
Notifications
You must be signed in to change notification settings - Fork 4
Authentication params
This section explains how to obtain the keys and tokens required to run Topic Mine that are then put in the config.json
file.
Parameter | Required | Recommended | Description |
---|---|---|---|
gemini_api_key | No | Yes | Used to access Gemini API directly. To obtain, follow instructions here. If Gemini API is blocked by your organization or you are unable to get a Gemini API Key, the Gemini API will be accessed through Vertex AI. This does not change the outcome of the generation and does not affect at all regarding the tool usage. |
login_customer_id | No | Yes | Required to use Google Ads' Keyword Planner. If not included, Topic Mine will use Gemini to generate keywords, which might not yield as precise keywords as the Keyword Planner. Google Ads customer ID, usually at the top right of Google Ads console with a format similar to XXX-XXX-XXXX. Copy without dashes or hyphens. |
google_ads_developer_token | No | Yes | Required to use Google Ads' Keyword Planner. If not included, Topic Mine will use Gemini to generate keywords, which might not yield as precise keywords as the Keyword Planner. To obtain, follow instructions here. |
client_id, client_secret and refresh_token | No | No | Required if you want to use OAuth 2.0 application level authentication, which is not recommended. To obtain, follow steps below. |
OAuth steps:
-
Go to Google Cloud console -> APIs & Services -> Credentials -> + Create credentials -> OAuth Client ID -> Desktop app and obtain your
client_id
andclient_secret
. -
Download credentials file generated in previous step
-
Rename it
creds.json
and paste insiderefresh_token_generator
folder -
Run
refresh_token_generator.py
:- Open a terminal
- Navigate using the
cd
command to the folder calledrefresh_token_generator
. If you start with the terminal in the root directory, you must execute the following command:
cd /refresh_token_generator
-
Check that you are in the right folder with the command
ls
. It should show just one file calledrefresh_token_generator.py
-
Run the following command:
./refresh_token_generator.py
-
Open url shown in terminal and follow steps
-
Once allowed permission, a site unreachable will appear in the web browser. Do not close it, copy the full url from the browser
-
Paste url in terminal and hit enter
-
Refresh token will be provided
- Home
- Project setup
- API Reference
-
Content endpoint
- Query params
-
Body params
- First term source config
- Second term source config
- Output config
- Request examples
- Response examples
- Tasks endpoint
-
Content endpoint