Get stories
GET
/api/stories
const url = 'http://localhost:3001/api/stories';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url http://localhost:3001/api/stories \ --header 'Authorization: <Authorization>'Retrieve all stories visible to the authenticated user (own stories + contacts’ stories)
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
Media typeapplication/json
object
message
string
stories
Array<object>
object
avatar_chunk_id
Owner avatar
integer
content
Caption/text
string
created_at
Unix timestamp
integer
duration
Video duration in ms
integer
expires_at
Unix timestamp
integer
first_name
Owner first name
string
has_viewed
Whether current user viewed it
boolean
height
Media height
integer
id
Story ID (hex)
string
is_own
Whether story belongs to current user
boolean
last_name
Owner last name
string
media_chunk_id
MeshStorage chunk ID for media
integer
media_type
“image” or “video”
string
privacy_level
“all”, “contacts”, “custom”
string
reply_count
Number of replies
integer
user_address
Story owner address
string
username
Owner username
string
view_count
Number of views
integer
width
Media width
integer
success
boolean
Examplegenerated
{ "message": "example", "stories": [ { "avatar_chunk_id": 1, "content": "example", "created_at": 1, "duration": 1, "expires_at": 1, "first_name": "example", "has_viewed": true, "height": 1, "id": "example", "is_own": true, "last_name": "example", "media_chunk_id": 1, "media_type": "example", "privacy_level": "example", "reply_count": 1, "user_address": "example", "username": "example", "view_count": 1, "width": 1 } ], "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}