> This page is for Developers.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.emnify.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.emnify.com/_mcp/server.

# Retrieve an eUICC profile's LPA activation code

GET https://cdn.emnify.net/api/v1/euicc/profile/{iccid_with_luhn}/activation_code

Returns the `LPA:1$<smdp-address>$<matching-id>` activation code for the eUICC profile identified by its ICCID (with Luhn check digit). The output format is chosen from the `Accept` header: `application/json` (default) returns the code as JSON alongside an `apple_universal_link` for Apple eSIM setup, `image/svg+xml` returns it rendered as a QR code SVG. Responses are always `Cache-Control: no-store` because the activation code is sensitive. A code is only served once the profile has been released to the device; otherwise the route resolves to `404`.

Reference: https://docs.emnify.com/developers/api/euicc-profile/get-euicc-profile-activation-code

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `iccid_with_luhn` (string, required) — ICCID including the Luhn check digit.

## Response

### 200

The activation code, as JSON or as a QR code SVG depending on the `Accept` header.

- `activation_code` (string, required)
- `apple_universal_link` (string, required)

## Errors

### 401 Unauthorized Error

Missing or invalid bearer token.

- `any`

### 403 Forbidden Error

Authenticated user lacks permission to view this activation code.

- `any`

### 404 Not Found Error

No profile exists for the ICCID, or no activation code is available for it (e.g. the profile has not been released yet).

- `any`

### 406 Not Acceptable Error

The `Accept` header requests a media type this route cannot produce (only `application/json` and `image/svg+xml` are supported).

- `any`

## Examples

**Response**

```json
{
  "activation_code": "string",
  "apple_universal_link": "string"
}
```

**SDK Code**

```python
import requests

url = "https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://cdn.emnify.net/api/v1/euicc/profile/89445001024109123455/activation_code")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```