Sign up for a sandbox account
Go to https://sandbox.portal.io and create a free sandbox dealer account. This account represents a test dealership and is the identity you will use when exchanging credentials and interacting with the sandbox API.Verify your email address before proceeding — unverified accounts cannot authenticate.
Get your API Application Key and Secret Key
After you have a sandbox account, contact your Portal.io representative and let them know. They will provide two values:
- API Application Key — a UUID that identifies your integration, sent as the
X-MSS-API-APPIDheader on every request. - Secret Key — a Base64-encoded string used as the raw key material when computing your HMAC-SHA256 request signatures. Keep this value secret.
Exchange your credentials for a User API Key
Call Replace Store this value — you will send it as
GET /authenticate/apikeyexchange with your Portal.io username and password as query parameters, along with the required HMAC authentication headers. A successful response returns a JSON object; the value at meta.apiKey is your User API Key.YOUR_APP_ID with your API Application Key and BASE64_HMAC_SIGNATURE with the HMAC-SHA256 signature you computed for this request. See Signing requests for how to compute the signature.A 200 response includes the User API Key in the response body:X-MSS-API-USERKEY on all subsequent requests.Include your User API Key on all subsequent requests
Every authenticated API call requires the User Key you obtained in the previous step. Include it as the
X-MSS-API-USERKEY header, and also incorporate its exact value into your HMAC canonical message when computing the signature for each request.The four required auth headers on every authenticated request are:| Header | Value |
|---|---|
X-MSS-API-APPID | Your API Application Key |
X-MSS-API-USERKEY | The User Key from the exchange |
X-MSS-CUSTOM-DATE | Current UTC timestamp in RFC 7231 format |
X-MSS-SIGNATURE | HMAC-SHA256 signature, Base64 encoded |
Make a test request
With your credentials in place, confirm everything is working by listing your proposals. A If you receive a
200 response with a proposals array means you are fully set up.401, double-check that your signature was computed correctly and that your X-MSS-CUSTOM-DATE timestamp exactly matches the value used in the canonical message. See authentication errors for more detail.