Skip to main content

Can I include private content in API responses?

Yes, you can retrieve private content by enabling the parameter (ignore_open_flg) in the relevant endpoint.

caution

An endpoint with ignore_open_flg enabled also returns content that has not been published yet.
If access must be limited, review the API security settings and the endpoint permission settings as well. For details, see API security.

Endpoint settings

On the side menu, click [API] and click [Edit] for the target endpoint.

Image from Gyazo

Under "Advanced settings", select the ignore_open_flg box and save these settings.

Image from Gyazo

Response verification

On the endpoint list screen, click [Swagger UI].

Image from Gyazo

Locate the target endpoint and click [Try it out].

Image from Gyazo

Click [Execute].

Image from Gyazo

You should see content whose publication setting is "Make private" included in the response.

Image from Gyazo

Content under private categories or tags

If the category or tag is private, enable the following parameters as well.

ParameterDescription
ignore_category_open_flgSelect this to include content of private categories in the response.
ignore_tag_open_flgSelect this to include content of private tags in the response.

Content registered as unlisted

Content registered with "Display in list > No" is retrieved with get_unlisted_data, not ignore_open_flg. For the setup, see Can I retrieve unlisted content posts using API?.


Support

If you have any other questions, please contact us or check out Our Slack Community.