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

# Get signing key by ID

GET https://api.fastpix.com/v1/iam/signing-keys/{signingKeyId}

This endpoint allows you to retrieve detailed information about a specific signing key using its unique key id. While the private key is not returned for security reasons, You can view the key’s creation date, status, and other associated metadata. This endpoint also returns the workspaceId and publicKey in the response.Usage: Generating a JWT tokenIn the response, the API returns the workspaceId and publicKey associated with the signing key. With the publicKey and the privateKey obtained from the "Create a Signing Key" endpoint, you can generate a JSON Web Token (JWT) using the RS256 algorithm. This token can be utilized for accessing private media assets, GIFs, thumbnails, and spritesheets.Payload:```
{ 
  "kid": "359302ee-2446-4afe-9348-8b4656b9ddb1", 
  "aud": "media:6cee6f85-9334-4a51-9ce3-e0241d94ceef", 
  "iss": "fastpix.com", 
  "sub": "", 
  "iat": 1706703204, 
  "exp": 1735626783 

} 
```- **kid:** The key ID of the signing key.
- **aud:** The audience for which the token is intended, enter the playbackId here.
- **iss:**  The issuer of the token (for example, "fastpix.com ").
- **sub:** The subject of the token, typically representing the user or entity the token is issued for. In this case, use the workspaceId fetched from the "Get Signing Key by ID" endpoint.
- **groups:** An array of groups the subject belongs to (for example, \["user"]).
- **iat:** The issued-at timestamp, indicating when the token was created.
- **exp:** The expiration timestamp, indicating when the token will no longer be valid.Use case scenario**Use case:** A developer is unsure about the status of a signing key they created months ago and wants to verify whether it's still in use or has expired.**Detailed example:**  You’re working on a streaming platform and realize you haven’t checked the status of a signing key that was used for playback access several months ago. By fetching the key details using its ID, you can confirm whether it’s still active, when it was created, and if it’s nearing expiration. This allows you to plan a rotation or deactivation if needed.

Reference: https://fastpix.com/docs/platform-api/signing-keys/get-signing-key-by-id

## Authentication

- `Authorization` header (basic auth, required) — FastPix APIs are secured with Basic Authentication. Use your Access Token ID as the username and Secret Key as the password in the Authorization header of each API request. * Username: Access Token ID * Password: Secret Key Activate your FastPix account to generate your API credentials. See the guide here

## Request

### Path parameters

- `signingKeyId` (string, required) — When creating the signing key, FastPix assigns a universally unique identifier with a maximum length of 255 characters.

## Response

### 200

successfully fetched signing key

- `success` (boolean, optional) — Shows the request status. Returns true for success and false for failure.
- `data` (GetPublicPemUsingSigningKeyIdResponseDtoData, optional) — Displays the result of the request.

## Types

### GetPublicPemUsingSigningKeyIdResponseDtoData

Displays the result of the request.

- `workspaceId` (string, optional) — FastPix generates a unique identifier for each workspace.
- `signingKeyId` (string, optional)
- `publicKey` (string, optional) — A public key is a byte encoded key used to create a signed JSON Web Token (JWT) for authentication.

## Examples

**Response**

```json
{
  "success": true,
  "data": {
    "workspaceId": "fc9d9368-6ee5-4b16-ae50-880ab374bdc6",
    "signingKeyId": "5ta85f64-5717-4562-b3fc-2c963f66afa6",
    "publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvfUkdkrPIZGOAwMwrkQ9Jr6uNEsVQCgax8xHMSf4Ib3IwlE90M/wLJZGmSWcaAWzH4nSE5qh/fF4E4xHY0hYMS78Ve9GSV8mtLfzjcZ0agfmFO0B0/YVaXNKDGc3CUWAOoONZEMCA3wqLNSZ3yQhr/IZ4xVqBR0GLSYtFt2VNNAmgfAQkVLcZy+3V1ZaC49EgK4AoR51iwwv9DzRjZ/3rM8MSS9lEy0WQGXP/x+0k8hQvq482r/G32TSG00ZSKQDpRFieaFh6YRxMd/R0bhVAvTTO8STQa/M4PZGoBFqkPTpCw5uShtpe+Hm85vlHk/2qYx5NqIe4l+c/yo4w/ny/QIDAQAB\n-----END PUBLIC KEY-----\n"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6"

response = requests.get(url, auth=("<username>", "<password>"))

print(response.json())
```

```javascript
const url = 'https://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6';
const credentials = btoa("<username>:<password>");

const options = {method: 'GET', headers: {Authorization: `Basic ${credentials}`}};

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://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6"

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

	req.SetBasicAuth("<username>", "<password>")

	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://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6")

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

request = Net::HTTP::Get.new(url)
request.basic_auth("<username>", "<password>")

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://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6")
  .basicAuth("<username>", "<password>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6', [
  'headers' => [
  ],
    'auth' => ['<username>', '<password>'],
]);

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

```csharp
using RestSharp;
using RestSharp.Authenticators;

var client = new RestClient("https://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6");
client.Authenticator = new HttpBasicAuthenticator("<username>", "<password>");
var request = new RestRequest(Method.GET);

IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let credentials = Data("<username>:<password>".utf8).base64EncodedString()

let headers = ["Authorization": "Basic \(credentials)"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fastpix.com/v1/iam/signing-keys/5ta85f64-5717-4562-b3fc-2c963f66afa6")! 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()
```