Interlace API Authentication
Use an Access Token to authenticate client requests when utilizing Interlace APIs.
Access Tokens are unique data strings used to authenticate users and enable access to privileged operations within Interlace APIs. All Interlace APIs rely on Access Tokens as the mechanism for authenticating client requests. It's essential to keep your access token confidential and secure at all times.
- Authentication is required for all API requests; without it, the requests will fail.
- All API requests must be made over HTTPS.
API Authentication
x-access-token: YOUR_ACCESS_TOKEN
API requests without authentication will fail. It is also important to note that all API requests must be made over HTTPS.
Test Authentication
1. Get Code
# Replace ${CLIENT_ID} with your client id
curl -H 'Accept: application/json' \
-X GET --url https://api-sandbox.interlace.money/open-api/oauth/authorize?clientId=${CLIENT_ID}
Successful Response
{
"timestamp": 1678775522,
"code": "a38810c9e0bdac584f86953721b9a965"
}
2. Request Access Token
# Replace ${CLIENT_ID} with your client id
# Replace ${CLIENT_SECRET} with your client secret
# Replace ${AUTH_CODE} with your code
curl -H 'Accept: application/json' \
-X POST --url https://api-sandbox.interlace.money/open-api/oauth/access-token \
--data "{
\"clientId\": ${CLIENT_ID},
\"clientSecret\": ${CLIENT_SECRET},
\"code\": ${AUTH_CODE}
}"
Successful Response
{
"accessToken": "be41c06e11795655e439cbd4b02c335e770ba27f",
"refreshToken": "b93a7ac26e7b70ef322fab08f234d8b7d0bda50c32dc5d6d972716e66788ad61",
"expiresIn": 86400,
"timestamp": 1678775835
}
Updated about 1 month ago