Search...
getPostBySlug( )
Developer Preview
Retrieves a single post by URL slug.
Authorization
Request
This endpoint does not take any parameters
Response Object
NAME
TYPE
DESCRIPTION
post
Post
Post for the provided post ID.
Status/Error Codes
Was this helpful?
getPostBySlug example
Copy Code
1import { posts } from 'wix-forum.v2';23 async function getPostBySlug(slug, options) {4 try {5 const result = await posts.getPostBySlug(slug, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13