-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathschwab_SidePane.html
40 lines (36 loc) · 1.19 KB
/
schwab_SidePane.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!-- Client Side html and js -->
<!DOCTYPE html>
<html>
<head>
<base target="_top">
</head>
<body>
<h1>Schwab Authentication</h1>
STEP 1: Launch the Schwab sign in process and obtain the response code.
<p>
<a href="<?=linkURL?>" target="blank">Click here to Login</a>
<p>
After logging in, an error page "This site can't be reached..." will be displayed. Copy the entire text (which contains the response code)
in the address bar and paste it here.
<p>
Response text: <input id="txtReturnURI" type="text"/>
<p>
STEP 2: Use it to obtain a Bearer Token and Refresh Token from Schwab.
<p>
<input id="Button1" type="button" value="Step 2" onmouseup="btnEnter()" />
<input id="Button2" type="button" value="Cancel" onmouseup="btnClose()" />
<script>
function btnEnter() {
var returnURI = document.getElementById("txtReturnURI").value;
var dict = {
returnURI: returnURI
}
google.script.run.withSuccessHandler(btnClose)
.schwab_backfromPane(dict);
}
window.btnClose = function() {
google.script.host.close();
};
</script>
</body>
</html>