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

66 lines
1.2 KiB
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
2024-11-21 13:27:18 +03:00
Neocities API docs: [neocities.org/api](https://neocities.org/api)
2024-09-24 11:38:18 +03:00
:::
<br/>
2024-12-16 19:38:57 +03:00
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
2024-10-20 22:36:03 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint neocities GetToken \
2024-10-22 08:59:24 +03:00
--login "2athenaeum" \
--password "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint neocities GetToken ^
2024-10-22 08:59:24 +03:00
--login "2athenaeum" ^
--password "***"
2024-10-20 22:36:03 +03:00
```
</TabItem>
</Tabs>
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
```