Trial links
List Trial Links
List all trial links for the account, including the details and statistics
AuthorizationBearer <token>
You can retrieve your token by visiting the OnlyFansAPI Console and clicking API Keys -> Create API Key.
In: header
Path Parameters
accountstring
The Account ID
Query Parameters
limitinteger
The number of trial links to return. Default 10
offsetinteger
The offset used for pagination. Default 0
sort?string
Sort the results. Default desc
Value in
"desc" | "asc"
field?string
Sort the results by a field. Default create_date
Value in
"create_date" | "expire_date" | "subscribe_counts" | "subscribe_days" | "claims_count"
synchronous?boolean
Wait for the revenue data to finish processing, instead of processing in the background. Will result in longer response times, use with caution. Default false
Response Body
curl -X GET "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date"
fetch("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date")
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
import requests
url = "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date"
response = requests.request("GET", url)
print(response.text)
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
import java.net.http.HttpResponse.BodyHandlers;
import java.time.Duration;
HttpClient client = HttpClient.newBuilder()
.connectTimeout(Duration.ofSeconds(10))
.build();
HttpRequest.Builder requestBuilder = HttpRequest.newBuilder()
.uri(URI.create("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date"))
.GET()
.build();
try {
HttpResponse<String> response = client.send(requestBuilder.build(), BodyHandlers.ofString());
System.out.println("Status code: " + response.statusCode());
System.out.println("Response body: " + response.body());
} catch (Exception e) {
e.printStackTrace();
}
using System;
using System.Net.Http;
using System.Text;
var client = new HttpClient();
var response = await client.GetAsync("https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/trial-links?limit=10&sort=desc&field=create_date");
var responseBody = await response.Content.ReadAsStringAsync();
{
"data": {
"list": [
{
"id": 123,
"trialLinkName": "Trial link name",
"url": "https://onlyfans.com/username/trial/abc123",
"subscribeDays": 30,
"subscribeCounts": 0,
"claimCounts": 123,
"expiredAt": null,
"createdAt": "2025-01-01T01:01:01+00:00",
"isFinished": false,
"revenue": {
"total": 123,
"revenuePerSubscriber": 12,
"calculatedAt": "2025-01-01T01:01:01+00:00",
"isLoading": false
},
"links": {
"related": {
"subscribers": "https://app.onlyfansapi.com/api/acct_abc123/trial-links/123/subscribers"
}
}
}
],
"hasMore": true
},
"_pagination": {
"next_page": "https://app.onlyfansapi.com/api/acct_abc123/trial-links?limit=10&offset=10"
},
"_meta": {
"_credits": {
"used": 1,
"balance": 115580,
"note": "Always"
},
"_cache": {
"is_cached": false,
"note": "Cache disabled for this endpoint"
},
"_rate_limits": {
"limit_minute": 1000,
"limit_day": 50000,
"remaining_minute": 997,
"remaining_day": 49990
}
}
}