1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-19 22:33:07 +02:00

46 lines
1.2 KiB
Markdown
Raw Normal View History

---
sidebar_position: 3
---
# Refresh token
Updates the v2 token using the refresh_token
2024-07-10 13:58:29 +03:00
`Function RefreshToken(Val Parameters = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
2024-09-24 11:38:18 +03:00
| Parameters | --auth | Structure Of String | Auth data or path to .json file |
Returns: Map Of KeyAndValue - serialized JSON response from Twitter
2024-07-10 14:05:58 +03:00
<br/>
2024-07-10 13:58:29 +03:00
```bsl title="Code example"
2024-09-24 11:38:18 +03:00
Parameters = GetTwitterAuthData();
Result = OPI_Twitter.RefreshToken(Parameters);
```
```sh title="CLI command example"
oint twitter RefreshToken --auth %auth%
```
```json title="Result"
2024-09-29 21:40:58 +03:00
{
"token_type": "bearer",
"expires_in": 7200,
2024-10-09 09:42:00 +03:00
"access_token": "TW1qcjhrVzUyT2tYaVVfZWtvem9wNVFPVlJEcE1xd3ZaU1ZRSkYxOTkzU1hyOjE3Mjg0NTI5NDY2NDM6MToxOmF0OjE",
2024-09-29 21:40:58 +03:00
"scope": "mute.write tweet.moderate.write block.read follows.read offline.access list.write bookmark.read list.read tweet.write space.read block.write like.write like.read users.read tweet.read bookmark.write mute.read follows.write",
2024-10-09 09:42:00 +03:00
"refresh_token": "bnRnOXpVdXVjdlp2azlkVjYzaEMwY2FxdFloTS03aWhYaHFjcEdodVpqMThjOjE3Mjg0NTI5NDY2NDM6MToxOnJ0OjE"
2024-09-29 21:40:58 +03:00
}
```