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

# List all secrets

GET https://api.prolific.com/api/v1/hooks/secrets/

A view of all the secrets for the workspaces you belong to.

Reference: https://docs.prolific.com/api-reference/webhooks/get-secrets

## Authentication

- `Authorization` header (required) (prefixed with `Token `) — The Prolific API uses API token to authenticate requests. You can create an API token directly from your settings. Your API token does not have an expiry date and carries full permission, so be sure to keep them secure. If your token is leaked, delete it and create a new one directly in the app. In your requests add `Authorization` header with the value `Token <your token>`.

## Request

### Query parameters

- `workspace_id` (string, required)

## Response

### 200

Retrieved

- `results` (list of object, optional) — A list of secrets.
  - `id` (string, optional) — The ID of the secret.
  - `value` (string, optional) — The secret value.
  - `workspace_id` (string, optional) — The ID of the workspace that the secret belongs to.

## Examples

**Response**

```json
{
  "0": {
    "id": "63722971f9cc073ecc730f6a",
    "value": "secret-and-safe",
    "workspace_id": "63722982f9cc073ecc730f6b"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.prolific.com/api/v1/hooks/secrets/"

querystring = {"workspace_id":"workspace_id"}

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

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

print(response.json())
```

```javascript
const url = 'https://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id';
const options = {method: 'GET', headers: {Authorization: 'Token <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://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id"

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

	req.Header.Add("Authorization", "Token <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://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id")

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

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Token <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://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id")
  .header("Authorization", "Token <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id', [
  'headers' => [
    'Authorization' => 'Token <token>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Token <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolific.com/api/v1/hooks/secrets/?workspace_id=workspace_id")! 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()
```