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

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

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Context](./context.context.md) &gt; [getScopedContext](./context.context.getscopedcontext.md)

## Context.getScopedContext() method

Get the context matching the scope

**Signature:**

```typescript
getScopedContext(scope: BindingScope.APPLICATION | BindingScope.SERVER | BindingScope.REQUEST): Context | undefined;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  scope | [BindingScope.APPLICATION](./context.bindingscope.md) \| [BindingScope.SERVER](./context.bindingscope.md) \| [BindingScope.REQUEST](./context.bindingscope.md) | Binding scope |

**Returns:**

[Context](./context.context.md) \| undefined


