2024-06-20 09:39:55 +02:00
|
|
|
---
|
|
|
|
sidebar_position: 1
|
|
|
|
---
|
|
|
|
|
|
|
|
# Get app authentication link
|
|
|
|
Forms a link for authorization via the browser
|
|
|
|
|
|
|
|
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
`Function GetAppAuthLink(Val Domain, Val ClientID) Export`
|
2024-06-20 09:39:55 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
| Parameter | CLI option | Type | Description |
|
|
|
|
|-|-|-|-|
|
|
|
|
| Domain | --domain | String | Current Bitrix URL (like 'portal.bitrix24.com') |
|
|
|
|
| ClientID | --clientid | String | Client ID from app settings |
|
2024-06-20 09:39:55 +02:00
|
|
|
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
Returns: String - URL for browser transition
|
2024-06-20 09:39:55 +02:00
|
|
|
|
2024-07-10 13:05:58 +02:00
|
|
|
<br/>
|
2024-07-10 10:59:55 +02:00
|
|
|
|
2024-07-10 12:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-06-20 09:39:55 +02:00
|
|
|
```bsl title="Code example"
|
2024-08-13 15:47:32 +02:00
|
|
|
Domain = "b24-ar17wx.bitrix24.by";
|
|
|
|
ClientID = "local.6667fc928a50a9.70414732";
|
|
|
|
|
|
|
|
Result = OPI_Bitrix24.GetAppAuthLink(Domain, ClientID);
|
2024-07-10 10:59:55 +02:00
|
|
|
```
|
2024-08-13 14:52:26 +02:00
|
|
|
|
2024-06-20 09:39:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
```sh title="CLI command example"
|
2024-08-13 14:52:26 +02:00
|
|
|
|
|
|
|
oint bitrix24 GetAppAuthLink --domain "b24-ar17wx.bitrix24.by" --clientid "local.6667fc928a50a9.70414732"
|
2024-06-20 09:39:55 +02:00
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
```json title="Result"
|
2024-08-14 08:06:31 +02:00
|
|
|
"https://b24-ar17wx.bitrix24.by/oauth/authorize/?client_id=local.6667fc928a50a9.70414732"
|
2024-06-20 09:39:55 +02:00
|
|
|
```
|