Embedded Portal
#
OverviewSunbit 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 Portalhttps://api-sandbox.sunbit.com/developers-portal-service/api/v2/auth/login-link#
POST#
Request HeadersProperty | Required | Type | Description |
---|---|---|---|
sunbit-key | yes | text | Provided to you by Sunbit |
sunbit-secret | yes | text | Provided to you by Sunbit |
#
BodyAttribute | Required | Type | Description |
---|---|---|---|
location | no | text | Store ID, or Store Name, or any other identifier of the location. |
#
ResponseAttribute | Type | Description |
---|---|---|
embeddedPortalURL | text | URL 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"}
#
ErrorsError Code | Message | Description |
---|---|---|
403 | Bad credentials | Sunbit key or secret is not valid |
422 | LocationNotFound | Location is required for multiple-vertical alliance |
422 | LocationNotFound | Location not found for alliance |
422 | LocationNotFound | Alliance vertical not found |
500 | Internal Server Error | Something went wrong on Sunbit's side. |