getPostBySlug( )

Gets a post by the provided slug.

The getPostBySlug() function returns a Promise that resolves to a post whose slug matches the given slug.

The slug is the end of a post's URL that refers to a specific post. For example, if a post's URL is https:/, the slug is my-post-slug. The slug is case-sensitive, and is generally derived from the post title, unless specified otherwise.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Blog
Manage Blog
Read Draft Blog Posts
Learn more about permission scopes.
Method Declaration
Method Parameters

Slug of the post to retrieve.

The end of a post's URL, for example, https:/ Case sensitive and generally based on the post title if not specified.


Options specifying which fields to return.

Return Type:Promise<GetPostBySlugResponse>
Was this helpful?