Authentication
The Vida Web SDK requires authentication through a Vida SSO-generated bearer token. This token verifies that the request originates from an authorized and legitimate source.
Obtaining the Bearer Token
To generate the token, you will need: (These are pre shared with you)
client_id
A unique identifier provided to you.
client_secret
A unique secret key configured for you.
These credentials must be passed to the Token API endpoint to obtain the access token.
Example: Generating the Token Using cURL
Replace
XXXXXXwith the actualclient_idandclient_secretprovided.The API will return an HTTP Status Code: 200 upon success.
Use the access_token from the response as an input for the SDK's init method.
Production
5 minutes
Sandbox
5 hours
Secure Storage and API Call Recommendations
Server-Side Storage: Ensure
client_id,client_secretare stored securely on your server. Do not expose these credentials on the client side.Server-to-Server Communication: The API call to obtain the bearer token must be made from your server to Vida's server.
Signing Key: Along with the
client_idandclient_secret, Vida will pre-share a signing key. Store this securely on your server and pass it along with the obtained token to the SDK'sinitmethod.
When initializing the Vida SDK:
Obtain the bearer token using the provided credentials.
Retrieve the securely stored signing key.
Pass both the token and signing key to the SDK's
initmethod.
This ensures a secure and authenticated interaction between your application and the Vida services.
Last updated
