List user stories
curl --request GET \
--url https://api.ofauth.com/v3/access/users/:userId/stories \
--header 'Authorization: Bearer <token>' \
--header 'x-linked-account-id: <api-key>'import requests
url = "https://api.ofauth.com/v3/access/users/:userId/stories"
headers = {
"x-linked-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-linked-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.ofauth.com/v3/access/users/:userId/stories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ofauth.com/v3/access/users/:userId/stories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-linked-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ofauth.com/v3/access/users/:userId/stories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-linked-account-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ofauth.com/v3/access/users/:userId/stories")
.header("x-linked-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v3/access/users/:userId/stories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-linked-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"userId": 123,
"isReady": true,
"media": [
{
"id": 123,
"type": "<string>",
"convertedToVideo": true,
"canView": true,
"hasError": true,
"isReady": true,
"createdAt": "<string>",
"duration": 123,
"hasCustomPreview": true,
"videoSources": {},
"files": {
"full": {
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"user": {
"id": 123,
"username": "<string>",
"name": "<string>",
"displayName": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {},
"isDeleted": true,
"isActive": true
},
"hasPost": true,
"isWatched": true,
"createdAt": "<string>",
"question": null,
"viewers": [
{
"id": 123,
"username": "<string>",
"name": "<string>",
"displayName": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {},
"isStoryLiked": true,
"isStoryBlockedUser": true,
"canLookStory": true,
"canCommentStory": true,
"hasNotViewedStory": true
}
],
"canLike": true,
"isLiked": true
}
]
}Stories
List user stories
Get active stories for a specific user.
Required scope: stories:read
GET
/
v3
/
access
/
users
/
:userId
/
stories
List user stories
curl --request GET \
--url https://api.ofauth.com/v3/access/users/:userId/stories \
--header 'Authorization: Bearer <token>' \
--header 'x-linked-account-id: <api-key>'import requests
url = "https://api.ofauth.com/v3/access/users/:userId/stories"
headers = {
"x-linked-account-id": "<api-key>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'x-linked-account-id': '<api-key>', Authorization: 'Bearer <token>'}
};
fetch('https://api.ofauth.com/v3/access/users/:userId/stories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ofauth.com/v3/access/users/:userId/stories",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"x-linked-account-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ofauth.com/v3/access/users/:userId/stories"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-linked-account-id", "<api-key>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ofauth.com/v3/access/users/:userId/stories")
.header("x-linked-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v3/access/users/:userId/stories")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-linked-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"items": [
{
"id": 123,
"userId": 123,
"isReady": true,
"media": [
{
"id": 123,
"type": "<string>",
"convertedToVideo": true,
"canView": true,
"hasError": true,
"isReady": true,
"createdAt": "<string>",
"duration": 123,
"hasCustomPreview": true,
"videoSources": {},
"files": {
"full": {
"sources": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"thumb": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
},
"preview": {
"url": "<string>",
"options": [
{
"url": "<string>",
"width": 123,
"height": 123,
"type": "<string>"
}
],
"width": 123,
"height": 123,
"size": 123
},
"squarePreview": {
"url": "<string>",
"width": 123,
"height": 123,
"size": 123
}
}
}
],
"user": {
"id": 123,
"username": "<string>",
"name": "<string>",
"displayName": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {},
"isDeleted": true,
"isActive": true
},
"hasPost": true,
"isWatched": true,
"createdAt": "<string>",
"question": null,
"viewers": [
{
"id": 123,
"username": "<string>",
"name": "<string>",
"displayName": "<string>",
"isVerified": true,
"avatar": "<string>",
"avatarThumbs": {},
"isStoryLiked": true,
"isStoryBlockedUser": true,
"canLookStory": true,
"canCommentStory": true,
"hasNotViewedStory": true
}
],
"canLike": true,
"isLiked": true
}
]
}Authorizations
Headers
Was this page helpful?