Authentication
Authenticating API requests
The API is designed around secure sessions. Once a session is created a JWT should be signed on the client side and provided in an Authorization header.
1
const { session_id, session_secret } = sessionResponse.data.payload;
2
3
const path = `/api/v1/session/${session_id}/accounts`;
4
const bearer = jwt.encode({
5
path: path,
6
session_id: session_id,
7
nonce: Date.now()
8
}, session_secret)
9
10
const accountsResponse = await axios.get(`https://partners.liquid.com${path}`,
11
{
12
headers: {
13
authorization: `Bearer ${bearer}`
14
}
15
})
16
Copied!
Last modified 1yr ago
Copy link