---
updatedAt: 2026-03-01T18:53:49.000Z
agentTools:
  siteIndex: https://techdocs.akamai.com/llms.txt
  projectIndex: https://techdocs.akamai.com/mfa/llms.txt
---

# Get a bypass code

```curl cURL
userId="user_2eVKpVVpgzM3fPWsao3sbh"
bypassCodeId="code_1ZG8vfR161vJO3Pq1fl2X0"

egcurl --eg-section default --request GET \
  --url "https://$hostname/amfa/v1/users/$userId/bypass-codes/$bypassCodeId" \
  --header "Accept: application/json"
```

```javascript Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection,
});

const userId = "user_2eVKpVVpgzM3fPWsao3sbh";
const bypassCodeId = "code_1ZG8vfR161vJO3Pq1fl2X0";

eg.auth({
  path: `/amfa/v1/users/${userId}/bypass-codes/${bypassCodeId}`,
  method: "GET",
  headers: {
    Accept: "application/json",
  },
});
eg.send(function (error, response, body) {
  console.log(JSON.stringify(JSON.parse(body), null, 2));
});
```

```python Python
import requests
import json
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urllib.parse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
userId = "user_2eVKpVVpgzM3fPWsao3sbh"
bypassCodeId = "code_1ZG8vfR161vJO3Pq1fl2X0"
 

path = '/amfa/v1/users/{}/bypass-codes/{}'.format(userId, bypassCodeId)
headers = {
  
  "Accept": "application/json"}  

result = session.get(urljoin(baseurl, path), headers=headers)
print(result.status_code)
print(json.dumps(result.json(), indent=2)) 
```

```json Response Example
{
  "bypassCodeId": "code_1ZG8vfR161vJO3Pq1fl2X0",
  "bypassCode": "etuvbvh45bpxjivw",
  "expirationDate": "2021-11-21T04:59:00",
  "remainingUses": 2,
  "createdDate": "2021-11-20T10:29:13.976+00:00",
  "modifiedDate": "2021-11-20T10:29:13.976+00:00"
}
```

# Set up authentication

<!-- curl@4 -->
<!-- javascript@1-8 -->
<!-- python@1-11 -->

Before you can use this API, you need to [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).

Then, you can include this code to apply the token values to validate your requests.

Refer to [EdgeGrid libraries](https://techdocs.akamai.com/developer/docs/authenticate-with-edgegrid#edgegrid-libraries) to install the necessary modules for various programming languages.

# Set your path parameters

<!-- curl@1-2 -->
<!-- javascript@10-11 -->
<!-- python@12-13 -->

Include the following path values:
- `userId`. A unique identifier for the user account.
- `bypassCodeId`. A unique identifier for the bypass code.

If you need these values, run [List users](https://techdocs.akamai.com/mfa/reference/get-users) and [List bypass codes](https://techdocs.akamai.com/mfa/reference/get-bypass-codes).

# Form the request URL

<!-- curl@5 -->
<!-- javascript@14 -->
<!-- python@16 -->

Specify the target endpoint.

# Call the API

<!-- curl@1-6 -->
<!-- javascript@1-22 -->
<!-- python@1-23 -->

Call GET on the request URL.

# View the response



The response object displays details about the specific bypass code.

To learn more about the response objects, refer to the response status code in the [Get a bypass code](https://techdocs.akamai.com/mfa/reference/get-bypass-code-by-id) operation.