Skip to main content

Embedded Portal

Overview#

Sunbit will provide a new API which will accept a location as the input and return a unique URL which will allow direct access to the portal without requiring the user to login.

Embedded Portal#

POST https://api-sandbox.sunbit.com/developers-portal-service/api/v2/auth/login-link#

Request Headers#

PropertyRequiredTypeDescription
sunbit-keyyestextProvided to you by Sunbit
sunbit-secretyestextProvided to you by Sunbit

Body#

AttributeRequiredTypeDescription
locationnotextStore ID, or Store Name, or any other identifier of the location.

Response#

AttributeTypeDescription
embeddedPortalURLtextURL to access Sunbit Partner Dashboard without login

Example#

Request#

  'https://api-sandbox.sunbit.com/developers-portal-service/api/v2/auth/login-link'' \  -H 'Content-Type: application/json' \  -H 'sunbit-key: YOUR_KEY' \  -H 'sunbit-secret: YOUR_SECRET' \  -d '{        "location": "sandbox"      }
Response#
{    "embeddedPortalURL": "https://dashboard.sunbit.com?token=eyJwcm9kVG9rZ...098562"}

Errors#

Error CodeMessageDescription
403Bad credentialsSunbit key or secret is not valid
422LocationNotFoundLocation is required for multiple-vertical alliance
422LocationNotFoundLocation not found for alliance
422LocationNotFoundAlliance vertical not found
500Internal Server ErrorSomething went wrong on Sunbit's side.