> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.12.0/integrations/initialization/configuration-options/service-connection.md).

# Service connection

These options tell WProofreader where to send spell check and grammar check requests.

#### Cloud

```js
serviceId: 'your-service-ID'
```

You can find your Service ID on the [Credentials](https://app.wproofreader.com/credentials) page in the admin panel.

#### Self-hosted

```js
serviceProtocol: 'https',
serviceHost: 'your_host_name',
servicePort: '443',
servicePath: 'wscservice/api'
```

You also need to point the `wscbundle.js` script `src` to your server. For NPM SDK integration, set the `srcUrl` option as well.

#### Request headers

If your server requires authentication, use the `requestHeaders` function to pass headers with every request. Only the `Authorization` header is supported. For cross-site requests, set `withCredentials: true`.

```js
requestHeaders: function() {
  return {
    Authorization: 'Bearer ' + localStorage.getItem('authorization')
  };
},
withCredentials: true,
```
