Standalone customer portal

Learn how link the Bunny customer portal with your platform to enable self service subscription management and upgrades.

This guide covers the customer portal integration from a developers point of view. It assumes that you have already setup your Products in Bunny and enabled them to be visible for self service.

Setup API credentials

Make a request from your backend to obtain the portal security token using the portalSessionCreate graphql request.

The API client will need to have the security:read and security:write scopes enabled.

Use the API client to generate a new access token with the security scopes.

Request a portal token

The portal token is obtained using the portalSessionCreate graphql request.

Attributes

{
  "tenantCode": "superdesk-123",
  "expiry": 123 // optional - default 24 hours
}

Mutation

mutation portalSessionCreate ($tenantCode: String!, $expiry: Int!) {
  portalSessionCreate (tenantCode: $tenantCode, expiry: $expiry) {
      errors
      token
  }
}

On success the response will contain a token attribute. You need to extract this token and use it in the next step.

Redirect to the customer portal

The final step is to redirect the browser to the customer portal by appending the token to the base url for your customer portal.

You can also redirect to specific pages within the customer portal by including the path to that page.

Last updated

Was this helpful?