curl --request POST \
--url https://api.sandbox.sardine.ai/v1/auth/client-tokens \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"referenceId": "42eadcb0-4a93-45af-9c8c-d295db5aeb6c",
"customerId": "adf02ae2-f633-11ec-b939-0242ac120002",
"nft": {
"name": "NFT #1",
"price": 100,
"currencyCode": "USD",
"imageUrl": "https://gateway.nftcompany.io/ipfsQmSAQm4gbhjSeUk7fuYppHd7Z8dfWpBvnFmqFSKqkrUJPM"
},
"identityPrefill": {
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-01-01",
"emailAddress": "foobar@gmail.com",
"phone": "+19254485826",
"address": {
"street1": "123 Main st",
"street2": "",
"city": "irvine",
"regionCode": "CA",
"postalCode": "02747",
"countryCode": "US"
}
},
"taxRates": {
"US": 10,
"US-CA": 20
}
}
'
{
"clientToken": "8aeae330-9154-4051-ab98-d173ba2bc7f0"
}{
"code": "UNAUTHORIZED",
"message": "Invalid client credentials"
}API Reference
Post Client Token
Exchange your clientId and clientSecret for a clientToken that can be be used in frontend code. clientToken will be unusable after the expiresAt time, which will normally be after 30 min.
To try the request in the mock server on the right, substitute username for clientId and password for clientSecre
POST
/
auth
/
client-tokens
curl --request POST \
--url https://api.sandbox.sardine.ai/v1/auth/client-tokens \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"referenceId": "42eadcb0-4a93-45af-9c8c-d295db5aeb6c",
"customerId": "adf02ae2-f633-11ec-b939-0242ac120002",
"nft": {
"name": "NFT #1",
"price": 100,
"currencyCode": "USD",
"imageUrl": "https://gateway.nftcompany.io/ipfsQmSAQm4gbhjSeUk7fuYppHd7Z8dfWpBvnFmqFSKqkrUJPM"
},
"identityPrefill": {
"firstName": "John",
"lastName": "Doe",
"dateOfBirth": "2000-01-01",
"emailAddress": "foobar@gmail.com",
"phone": "+19254485826",
"address": {
"street1": "123 Main st",
"street2": "",
"city": "irvine",
"regionCode": "CA",
"postalCode": "02747",
"countryCode": "US"
}
},
"taxRates": {
"US": 10,
"US-CA": 20
}
}
'
{
"clientToken": "8aeae330-9154-4051-ab98-d173ba2bc7f0"
}{
"code": "UNAUTHORIZED",
"message": "Invalid client credentials"
}Authorizations
Body
application/json