Skip to content

Commit 5357728

Browse files
author
Eric Koleda
authored
Added breaking changes section to README
Also reformatted the file some.
1 parent f6fed2e commit 5357728

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

README.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,9 @@ function authCallback(request) {
146146
}
147147
```
148148

149-
If the authorization URL was opened by the Apps Script UI (via a link, button, etc)
150-
it's possible to automatically close the window/tab using `window.top.close()`.
151-
You can see an example of this in the sample add-on's
149+
If the authorization URL was opened by the Apps Script UI (via a link, button,
150+
etc) it's possible to automatically close the window/tab using
151+
`window.top.close()`. You can see an example of this in the sample add-on's
152152
[Callback.html](samples/Add-on/Callback.html#L47).
153153

154154
### 4. Get the access token
@@ -216,7 +216,13 @@ in these requests.
216216
See the [FitBit sample](samples/FitBit.gs) for the complete code.
217217

218218
#### Modifying the access token payload
219-
Similar to Setting additional token headers, some services, such as the Smartsheet API, require you to [add a hash to the access token request payloads](http://smartsheet-platform.github.io/api-docs/?javascript#oauth-flow). The `setTokenPayloadHandler` method allows you to pass in a function to modify the payload of an access token request before the request is sent to the token endpoint:
219+
220+
Similar to Setting additional token headers, some services, such as the
221+
Smartsheet API, require you to
222+
[add a hash to the access token request payloads](http://smartsheet-platform.github.io/api-docs/?javascript#oauth-flow).
223+
The `setTokenPayloadHandler` method allows you to pass in a function to modify
224+
the payload of an access token request before the request is sent to the token
225+
endpoint:
220226

221227
```js
222228
// Set the handler for modifying the access token request payload:
@@ -240,3 +246,10 @@ wishes to access the resources of a particular user, it uses the service account
240246
authorization flow to obtain an access token. See the sample
241247
[`GoogleServiceAccount.gs`](samples/GoogleServiceAccount.gs) for more
242248
information.
249+
250+
## Breaking changes
251+
252+
* Version 20 - Switched from using project keys to script IDs throughout the
253+
library. When upgrading from an older version, ensure the callback URL
254+
registered with the OAuth provider is updated to use the format
255+
`https://script.google.com/macros/d/{SCRIPT ID}/usercallback`.

0 commit comments

Comments
 (0)