1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-05-29 23:17:45 +02:00

41 lines
868 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-10-13 01:21:47 +03:00
| Parameters | --auth | Structure Of String | Authorization data. See GetStandardParameters |
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-29 19:41:20 +03:00
Parameters = GetTwitterAuthData();
Code = "123456";
Result = OPI_Twitter.GetToken(Code, Parameters);
```
2024-10-15 09:53:37 +03:00
```json title="Result"
2024-09-29 21:40:58 +03:00
{
"error": "invalid_request",
"error_description": "Value passed for the authorization code was invalid."
}
```