> 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.iot.telia.lt/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.iot.telia.lt/_mcp/server.

# Retrieve a service profile

GET https://iot.telia.lt/api/v1/service_profile/{profile_id}

Retrieve a service profile with a given id.


Reference: https://docs.iot.telia.lt/developers/api/service-profiles/service-profile-by-profile-id-get

## Authentication

- `Authorization` header (bearer token, required) — An `auth_token` should be provided to authenticate a session. To obtain an `auth_token`, see the [`/api/v1/authenticate` **POST** request](/developers/api/authentication/authenticate).

## Request

### Path parameters

- `profile_id` (double, required) — The Numeric ID of a Service Profile

## Response

### 200

Success

- `id` (integer, optional)
- `name` (string, optional)
- `description` (string, optional)
- `allowed_3g` (boolean, optional)
- `allowed_4g` (boolean, optional)
- `allowed_nb_iot` (boolean, optional)
- `apply_sms_quota` (boolean, optional)
- `apply_data_quota` (boolean, optional)
- `retail` (boolean, optional)
- `sms_p2p_int` (boolean, optional)
- `sms_p2p_ext` (boolean, optional)
- `prepaid` (boolean, optional)
- `nipdp` (boolean, optional)
- `used_count` (integer, optional)
- `api_callback` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiCallback, optional)
- `api_secret` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiSecret, optional)
- `moc_callback` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaMocCallback, optional)
- `esme_interface_type` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaEsmeInterfaceType, optional)
- `breakout_region` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaBreakoutRegion, optional)
- `service` (list of ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaServiceItems, optional)
- `ip_firewall_rule_set` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaIpFirewallRuleSet, optional)
- `dns_firewall_rule_set` (ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaDnsFirewallRuleSet, optional)

## Errors

### 403 Forbidden Error

Your role doesn't include the permission this endpoint requires. Most endpoints return `error_code`, `error_token`, and `message`. Some return only `status_code` and `message`.

- `error_code` (integer, optional)
- `error_token` (string, optional)
- `status_code` (integer, optional)
- `message` (string, optional)

## Types

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiCallback

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaApiSecret

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaMocCallback

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaEsmeInterfaceType

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaBreakoutRegion

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaServiceItems

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaIpFirewallRuleSet

- `ip_firewall_profiles` (list of ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaIpFirewallRuleSetIpFirewallProfilesItems, optional)
- `enforce` (boolean, optional)

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaDnsFirewallRuleSet

- `dns_firewall_profiles` (list of ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaDnsFirewallRuleSetDnsFirewallProfilesItems, optional)
- `enforce` (boolean, optional)
- `mode` (enum, optional)
  - Allowed values: `allowlist`, `blocklist`

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaIpFirewallRuleSetIpFirewallProfilesItems

- `id` (integer, optional)
- `name` (string, optional)
- `added` (string, optional)

### ApiV1ServiceProfileProfileIdGetResponsesContentApplicationJsonSchemaDnsFirewallRuleSetDnsFirewallProfilesItems

- `id` (integer, optional)
- `name` (string, optional)
- `added` (string, optional)

## Examples

**Response**

```json
{
  "id": 232,
  "name": "Smart meter",
  "description": "Data + SMS - 1G limit",
  "allowed_3g": true,
  "allowed_4g": true,
  "allowed_nb_iot": true,
  "apply_sms_quota": false,
  "apply_data_quota": false,
  "retail": false,
  "sms_p2p_int": true,
  "sms_p2p_ext": true,
  "nipdp": false,
  "used_count": 12,
  "api_callback": {
    "created": "2019-03-18T16:11:07.000Z",
    "id": 38,
    "purpose": "Customer's Webserver",
    "url": "https://www.customers-server.com"
  },
  "api_secret": {
    "id": 38,
    "purpose": "K3"
  },
  "moc_callback": {
    "created": "2019-03-18T16:11:17.000Z",
    "id": 39,
    "purpose": "Customer's Moc server",
    "url": "https://moc.customers-server.com"
  },
  "esme_interface_type": {
    "description": "Console",
    "id": 3
  },
  "breakout_region": {
    "id": 3,
    "ip_address": "0.0.0.0",
    "name": "eu-west-1"
  },
  "service": [
    {
      "description": "Data",
      "id": 123,
      "teleservice_code": 7678345,
      "traffic_limit": [
        {
          "id": 123,
          "period": {
            "id": 33,
            "time_units": 5,
            "unit": "Days"
          },
          "volume": 64
        },
        {
          "id": 234,
          "period": {
            "id": 35,
            "time_units": 1,
            "unit": "Months"
          },
          "volume": 128
        }
      ],
      "traffic_type": {
        "description": "Data",
        "id": 1,
        "unit": "GB"
      }
    }
  ],
  "ip_firewall_rule_set": {
    "ip_firewall_profiles": [
      {
        "id": 43,
        "name": "Default Inbound Block",
        "added": "2026-04-09T11:12:45+00:00"
      }
    ],
    "enforce": true
  },
  "dns_firewall_rule_set": {
    "dns_firewall_profiles": [
      {
        "id": 10,
        "name": "Corporate DNS Policy",
        "added": "2026-07-07T08:15:00+00:00"
      }
    ],
    "enforce": true,
    "mode": "allowlist"
  }
}
```

**SDK Code**

```python Retrieved
import requests

url = "https://iot.telia.lt/api/v1/service_profile/1.1"

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

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

print(response.json())
```

```javascript Retrieved
const url = 'https://iot.telia.lt/api/v1/service_profile/1.1';
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 Retrieved
package main

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

func main() {

	url := "https://iot.telia.lt/api/v1/service_profile/1.1"

	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 Retrieved
require 'uri'
require 'net/http'

url = URI("https://iot.telia.lt/api/v1/service_profile/1.1")

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 Retrieved
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://iot.telia.lt/api/v1/service_profile/1.1")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://iot.telia.lt/api/v1/service_profile/1.1', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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

```csharp Retrieved
using RestSharp;

var client = new RestClient("https://iot.telia.lt/api/v1/service_profile/1.1");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Retrieved
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://iot.telia.lt/api/v1/service_profile/1.1")! 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()
```