1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-01-24 05:36:29 +02:00

47 lines
831 B
Plaintext
Raw Normal View History

2024-10-15 10:50:56 +03:00
---
2024-09-24 11:38:18 +03:00
sidebar_position: 2
---
2024-10-15 10:50:56 +03:00
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
2024-09-24 11:38:18 +03:00
# Get token
Receives authorization token by login and password
`Function GetToken(Val Login, Val Password) Export`
2024-10-15 15:15:47 +03:00
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Login | --login | String | ✔ | Users login |
| Password | --password | String | ✔ | Users password |
2024-09-24 11:38:18 +03:00
2024-10-09 09:42:00 +03:00
Returns: Map Of KeyAndValue - serialized JSON response from Neocities
2024-09-24 11:38:18 +03:00
<br/>
:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)
:::
<br/>
2024-10-15 21:15:56 +03:00
```bsl title="1C:Enterprise/OneScript code example"
2024-09-24 11:38:18 +03:00
Login = "2athenaeum";
Password = "Rit...";
Result = OPI_Neocities.GetToken(Login, Password);
```
2024-10-15 09:53:37 +03:00
2024-09-24 11:38:18 +03:00
```json title="Result"
2024-09-25 15:22:14 +03:00
{
"result": "success",
"api_key": "***"
}
2024-09-24 11:38:18 +03:00
```