---
sidebar_position: 4
description: Add OAuth V1 authorization and other functions to work with HTTP-client 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, HTTP-client]
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

# Add OAuth V1 authorization
 Adds data for OAuth v1 authorization



`Function AddOAuthV1Authorization(Val Token, Val Secret, Val ConsumerKey, Val ConsumerSecret, Val Version) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Token | --token | String | &#x2714; | Token for authorization |
  | Secret | --secret | String | &#x2714; | Secret for authorization |
  | ConsumerKey | --ck | String | &#x2714; | Consumer key for authorization |
  | ConsumerSecret | --cs | String | &#x2714; | Consumer secret for authorization |
  | Version | --ver | String | &#x2714; | API version |

  
  Returns:  DataProcessorObject.OPI_HTTPClient - This processor object

:::tip
By default, HMAC-SHA256 is used to create the signature. To change the algorithm, you can use `SetOAuthV1Algorithm`
:::
<br/>


```bsl title="1C:Enterprise/OneScript code example"
    URL = "https://bin.openintegrations.dev";
    URL = URL + "/get";

    Token       = "***";
    Secret      = "***";
    UsersKey    = "***";
    UsersSecret = "***";
    Version     = "1.0";

    Result = OPI_HTTPRequests.NewRequest()
        .Initialize(URL)
        .AddOAuthV1Authorization(Token, Secret, UsersKey, UsersSecret, Version) // <---
        .ProcessRequest("GET")
        .ReturnResponseAsJSONObject();
```
 



```json title="Result"
{
 "args": {},
 "headers": {
  "Accept": "*/*",
  "Accept-Charset": "utf-8",
  "Accept-Encoding": "gzip",
  "Authorization": "OAuth oauth_consumer_key=\"***\",oauth_token=\"***\",oauth_signature_method=\"HMAC-SHA256\",oauth_timestamp=\"1765387350\",oauth_nonce=\"1765387350\",oauth_version=\"1.0\",oauth_signature=DYK%2FWlz57A2zFwIpNzNMyHulaZiKJqausF6h52W6gPo%3D",
  "Connection": "Keep-Alive",
  "Content-Length": "0",
  "Host": "localhost:2424",
  "Max-Forwards": "10",
  "User-Agent": "1Script v$2.0.0.0",
  "X-Arr-Log-Id": "e3cf0eb9-6769-415d-8705-6f5c98c88c34",
  "X-Arr-Ssl": "2048|256|C=BE, O=GlobalSign nv-sa, CN=GlobalSign GCC R6 AlphaSSL CA 2025|CN=*.openintegrations.dev",
  "X-Forwarded-Host": "bin.openintegrations.dev",
  "X-Original-Url": "***"
 },
 "origin": "***",
 "url": "https://bin.openintegrations.dev/get"
}
```
