Use Sessions ↗ to provide your users with access to the Bannerbear template editor. When you create a Session, you'll receive a session_editor_url, which provides a secure and expiring access to the Bannerbear template editor for a specific template. This link can be used by your users, even if they are not a Bannerbear member.
Ensure that Web Sessions are enabled in your project settings:
Send a POST request to /sessions with the template uid (unique ID) that you want to grant access to. You can also include an optional metadata string.
The API will respond with a secure link under "session_editor_url" that you can embed as an iframe, or you can send to your users directly (they would see the bannerbear.com domain in this case).
You can make a GET request to the /sessions/:uid endpoint for the Session information referenced by its uid.
You can start a session in preview mode (no editor tools, read-only) by passing the {preview_mode: true} parameter when creating a Session.
Furthermore, you can append a ?modifications= query string to load the preview mode Session with custom modifications. This may be useful when showing users template edits before rendering images.
The modifications query string parameter should be a base64 encoded payload of JSON modifications as per the standard Images API.
Example:
YOUR_SESSION_URL/?modifications=W3sibmFtZSI6InRpdGxlIiwgInRleHQiOiAidGhpcyBpcyB0aGUgdGl0bGUgdGV4dCJ9XQ==