1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-06-02 23:27:50 +02:00

42 lines
822 B
Markdown
Raw Normal View History

---
sidebar_position: 2
---
# Get token
Gets the token by the code received when authorizing using the link from GetAuthorizationLink
2024-07-10 13:58:29 +03:00
`Function GetToken(Val Code, Val Parameters = "") Export`
| Parameter | CLI option | Type | Description |
|-|-|-|-|
| Code | --code | String | Code obtained from authorization See GetAuthorizationLink |
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"
Response = OPI_Twitter.GetToken(Code, Parameters);
Response = OPI_Tools.JSONString(Response);
```
```sh title="CLI command example"
oint twitter GetToken --code %code% --auth %auth%
```
```json title="Result"
2024-09-29 17:27:25 +03:00
```