---
lang: en
title: 'API docs: core.application.interceptor'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/core
permalink: /doc/en/lb4/apidocs.core.application.interceptor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/core](./core.md) &gt; [Application](./core.application.md) &gt; [interceptor](./core.application.interceptor.md)

## Application.interceptor() method

Register an interceptor

**Signature:**

```typescript
interceptor(interceptor: Interceptor | Constructor<Provider<Interceptor>>, nameOrOptions?: string | InterceptorBindingOptions): Binding<Interceptor>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

interceptor


</td><td>

[Interceptor](./context.interceptor.md) \| [Constructor](./context.constructor.md)<!-- -->&lt;[Provider](./context.provider.md)<!-- -->&lt;[Interceptor](./context.interceptor.md)<!-- -->&gt;&gt;


</td><td>

An interceptor function or provider class


</td></tr>
<tr><td>

nameOrOptions


</td><td>

string \| [InterceptorBindingOptions](./context.interceptorbindingoptions.md)


</td><td>

_(Optional)_ Binding name or options


</td></tr>
</tbody></table>

**Returns:**

[Binding](./context.binding.md)<!-- -->&lt;[Interceptor](./context.interceptor.md)<!-- -->&gt;


