2024-06-05 12:19:46 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 3
|
|
|
|
---
|
|
|
|
|
|
|
|
# Refresh token
|
|
|
|
Gets a new token based on the refresh token
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
<br/>
|
|
|
|
|
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function RefreshToken(Val AppKey, Val AppSecret, Val RefreshToken) Export`
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
| Parameter | CLI option | Type | Destination |
|
|
|
|
|-|-|-|-|
|
|
|
|
| AppKey | --appkey | String | Application key |
|
|
|
|
| AppSecret | --appsecret | String | Application secret |
|
|
|
|
| RefreshToken | --refresh | String | Refresh token |
|
|
|
|
|
|
|
|
|
2024-06-06 14:33:52 +02:00
|
|
|
Returns: Map Of KeyAndValue - serialized JSON response from Dropbox
|
2024-06-05 12:19:46 +02:00
|
|
|
|
2024-07-10 13:05:58 +02:00
|
|
|
<br/>
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
```bsl title="Code example"
|
2024-07-10 13:24:11 +02:00
|
|
|
AppKey = "oynqxds...";
|
2024-06-05 12:19:46 +02:00
|
|
|
AppSecret = "tk2oewn...";
|
|
|
|
RefreshToken = "oZFWg3DmZ_IAAAAAAAAAAWilOA0M1SjV...";
|
|
|
|
|
|
|
|
Result = OPI_Dropbox.RefreshToken(AppKey, AppSecret, RefreshToken);
|
|
|
|
```
|
2024-07-10 10:59:55 +02:00
|
|
|
|
|
|
|
|
2024-06-05 12:19:46 +02:00
|
|
|
|
|
|
|
```sh title="CLI command example"
|
|
|
|
|
|
|
|
oint dropbox RefreshToken --appkey "oynqxds..." --appsecret "tk2oewn..." --refresh "oZFWg3DmZ_IAAAAAAAAAAWilOA0M1SjV..."
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-07-10 13:11:17 +02:00
|
|
|
{
|
2024-06-05 12:19:46 +02:00
|
|
|
"access_token": "sl.B2M8yVLTS_ojO3UsFs2tRlXxkFh50RLOkroi3SLCwcjA2xX58JY__GXKh9vPGnGcfDkkTJJYB1Wn9tFvj6cRs3w04TnfaBQnJiOfUb58UHexTCAdck9xNFIBAQjuAQKUtkoht66bvsu4oh6Wl6gQpvU",
|
|
|
|
"token_type": "bearer",
|
|
|
|
"expires_in": 14400
|
|
|
|
}
|
|
|
|
```
|