1
1
# Google Ads Doctor - oauthdoctor
2
- This program will verify your Google Ads client oauth environment and report
2
+ This program will verify your Google Ads client OAuth2 environment and report
3
3
anomalies. Where possible, it will guide you through correcting the problems.
4
4
This assumes that you have already completed the steps in your client library
5
5
[ README.md] ( https://developers.google.com/google-ads/api/docs/first-call/get-client-lib )
6
6
file.
7
7
8
8
The program vets your client library configuration file, verifies connectivity
9
- to the Google Ads host, and simulates either the installed application or web
9
+ to the Google Ads host, and executes either the installed application or web
10
10
flow OAuth2 process.
11
11
12
12
If it discovers errors it will attempt to guide you to correct them. For example,
13
13
if your refresh token is invalid, it will walk you through the process of
14
14
creating a valid token which is then written to your client library configuration
15
15
file.
16
16
17
- # Requirements
18
- Go minimum version 1.11. We require 1.11 or greater because we are using
19
- [ Go modules ] ( https://github.com/golang/go/wiki/Modules ) for dependency management .
17
+ # Downloads
18
+ If you are building from source, follow the
19
+ [ source installation instructions ] ( #source ) .
20
20
21
- # Setup
22
- To run the program, you first need to install the Go programming language
23
- runtime. Download the [ latest version] ( https://golang.org/dl/ ) and follow
24
- the installation instructions.
21
+ If you want to use a pre-compiled binary, fetch the repository and
25
22
26
- Clone the repository outside of your GOPATH. If you must clone within your GOPATH
27
- then set the environment variable ` GO111MODULE=off `
23
+ ```
24
+ cd <your_path>/google-ads-doctor/oauthdoctor/bin
28
25
29
- # Running the program
30
- Once you have verified your Go installation, in a terminal, change to the
31
- directory where you cloned the repository. Change to the directory
32
- oauthdoctor.
26
+ ```
33
27
34
- At the command line, type:
28
+ There are three directories, one each for Darwin (OSX), Linux, and Windows.
29
+ You can run the binary in place or copy the file to any location on your system.
35
30
36
31
```
37
- go build ./oauthdoctor.go
32
+ bin
33
+ ├── darwin
34
+ │ ├── 386
35
+ │ └── amd64
36
+ ├── linux
37
+ │ ├── 386
38
+ │ └── amd64
39
+ └── windows
40
+ ├── 386
41
+ └── amd64
38
42
```
39
43
40
- This will produce a binary called oauthdoctor.
44
+
45
+ # <a name =" running " ></a > Running the Program
41
46
42
47
```
43
- ./ oauthdoctor -help
48
+ oauthdoctor -help
44
49
```
45
50
46
- This will display the available command line options. Two of them, -language and
51
+ This displays the available command line options. Two of them, -language and
47
52
-oauthtype are required. So for an installation using Python and the installed
48
53
application OAuth flow, you would type:
49
54
50
55
```
51
- go run ./ oauthdoctor.go -language python -oauthtype installed_app
56
+ oauthdoctor -language python -oauthtype installed_app
52
57
```
53
58
54
59
If your configuration file is not in your home directory (the default location),
55
60
then you will want to specify the location with the --configpath option.
56
61
57
62
```
58
- go run ./ oauthdoctor.go -language python -oauthtype installed_app -configpath /my/path
63
+ oauthdoctor -language python -oauthtype installed_app -configpath /my/path
59
64
```
60
65
61
66
-sysinfo prints the system information to stdout. This is
62
67
primarily of use if you need to send the output of the program when contacting
63
68
support.
64
69
65
- -verbose is for debugging. It will print the complete JSON response .
70
+ -verbose is for debugging. It will print the complete JSON responses .
66
71
67
72
-hidePII is for when you are sending the output to someone and you want to
68
73
mask sensitive information like your Client Secret.
@@ -73,10 +78,39 @@ If you want to send the output to someone else to assist you with a problem,
73
78
consider using the --hidePII option. This will mask sensitive information such
74
79
as your client secret and refresh token.
75
80
81
+
82
+ # <a name =" source " ></a > Install from Source
83
+
84
+ Clone the repository outside of your GOPATH. If you must clone within your GOPATH
85
+ then set the environment variable ` GO111MODULE=off ` .
86
+
87
+ Download and install the Go programming language runtime
88
+ [ latest version] ( https://golang.org/dl/ ) and follow the installation instructions.
89
+
90
+ Google Ads Doctor requires Go version 1.11 or greater because we are using
91
+ [ Go modules] ( https://github.com/golang/go/wiki/Modules ) for dependency management.
92
+
93
+ Once you have verified your Go installation, in a terminal, change to the
94
+ directory where you cloned the repository and
95
+
96
+ ```
97
+ cd oauthdoctor
98
+ ```
99
+
100
+ At the command line, type:
101
+
102
+ ```
103
+ go build ./oauthdoctor.go
104
+ ```
105
+
106
+ This produces a binary called oauthdoctor. From here, follow the the
107
+ instructions in [ Running the Program] ( #running )
108
+
109
+
76
110
# Where do I submit bug reports or feature requests?
77
111
78
112
If you have issues directly related to ` oauthdoctor ` , use the
79
- [ issue tracker] ( https://github.com/googleads/googleads- doctor/issues ) .
113
+ [ issue tracker] ( https://github.com/googleads/google-ads- doctor/issues )
80
114
81
115
For issues with the Google Ads API, visit [ Google Ads API Support] ( https://developers.google.com/google-ads/api/support )
82
116
0 commit comments