1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-12-05 22:53:35 +02:00
Files
OpenIntegrations/docs/en/md/Neocities/Data-retrieving/Get-token.mdx
Vitaly the Alpaca (bot) b9d345b8d8 Main build (Jenkins)
2025-05-05 11:15:20 +03:00

68 lines
1.5 KiB
Plaintext
Vendored

---
sidebar_position: 2
description: Get token and other functions to work with Neocities in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, Neocities]
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get token
Receives authorization token by login and password
`Function GetToken(Val Login, Val Password) Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| Login | --login | String | ✔ | Users login |
| Password | --password | String | ✔ | Users password |
Returns: Map Of KeyAndValue - serialized JSON response from Neocities
<br/>
:::tip
Neocities API docs: [neocities.org/api](https://neocities.org/api)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
Login = "2athenaeum";
Password = "Rit...";
Result = OPI_Neocities.GetToken(Login, Password);
```
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint neocities GetToken \
--login "2athenaeum" \
--password "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint neocities GetToken ^
--login "2athenaeum" ^
--password "***"
```
</TabItem>
</Tabs>
```json title="Result"
{
"result": "success",
"api_key": "***"
}
```