﻿---
sidebar_position: 3
description: Use body fields at OAuth  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';

# Use body fields at OAuth 
 Includes or excludes body fields when calculating the OAuth signature depending on server requirements



`Function UseBodyFiledsAtOAuth(Val Flag) Export`

  | Parameter | CLI option | Type | Required | Description |
  |-|-|-|-|-|
  | Flag | - | Boolean | &#x2714; | Flag to use body fields in OAuth signature calculation |

  
  Returns:  DataProcessorObject.OPI_HTTPClient - This processor object

<br/>

:::tip
By default, the body data is used in the signature calculation if it was set using the `SetFormBody` function
:::

:::caution
**NOCLI:** this method is not available in CLI version
:::
<br/>



```bsl title="1C:Enterprise/OneScript code example"
    URL = "https://httpbin.org";
    URL = URL + "/post";

    Image = "https://api.athenaeum.digital/test_data/picture.jpg"; // URL, Path or Binary Data

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

    NewRequest = OPI_HTTPRequests.NewRequest().Initialize(URL);

    Result = NewRequest
        .StartMultipartBody()
        .AddMultipartFormDataFile("file1", "pic.png", Image, "image/png")
        .AddMultipartFormDataField("field1", "Text")
        .AddMultipartFormDataField("field2", "10")
        .UseBodyFiledsAtOAuth(False) // <---
        .AddOauthV1Authorization(Token, Secret, UsersKey, UsersSecret, Version)
        .ProcessRequest("POST")
        .ReturnResponseAsJSONObject();
```
 




