---
schema_version: "1"
id: b3b97dc5ddf34ca81b3fa42f1643f2fa28cf772f3483819c19ddb044909f38d0
title: callApex()
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/platform/aura-platform/guides/aura/container/container-npm-callapex.md
canonical_url: https://developer.salesforce.com/docs/platform/aura-platform/guide/container-npm-callapex.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c14518885fb6da32f20b7032c890a05a62ec29aec8354e4a92b136112810fe40
products:
  - Lightning Aura Components Developer Guide
  - Platform Developer Content
---

# callApex()

Makes an Apex call.

## Sample

Used within a JavaScript app uploaded as a static resource and referenced by `lightning:container`, this example calls the Apex method `getAccount`.

```javascript
  callApex() {
    LCC.callApex(
        "lcc1.ApexController.getAccount",
        this.state.name,
        this.handleAccountQueryResponse,
        { escape: true }
    );
}
```

When the Apex method you are calling doesn't require any parameters, pass an empty array.

```nolang
callApex() {
    LCC.callApex(
        "lcc1.ApexController.getAccountWithNoParams",
        [], // Empty array for no parameters
        this.handleAccountQueryResponse,
        { escape: true }
    );
}
```

## Arguments

|Name|Type|Description|
|----|----|-----------|
|`fullyQualifiedApexMethodName`|string|The name of the Apex method.|
|`apexMethodParameters`|array|A JSON array of arguments for the Apex method.|
|`callbackFunction`|function|A callback function.|
|`apexCallConfiguration`|array|Configuration parameters for the Apex call.|

## Response

None.

