"""
NOTE: you can find make_request in the full example located in the
API Signed Requests documentation page
"""
import base64
import json
wallet_address = '...'
# You can find `make_request` in "How to sign API"."Full Example" page
access_response = make_request(f'/api/v1/privacy/access/{wallet_address}')
auth_token = access_response['data']['authToken']
access_token = access_response['data']['accessToken']
x_access_token = base64.b64encode(
f'{auth_token}:{access_token}'.encode('utf-8')
).decode('utf-8')
pii_response = make_request(
query_string='scopes=FN,EM', # sparse scopes (optional)
path=f'/api/v1/privacy/data/{wallet_address}',
extra_headers={
'X-Access-Token': x_access_token
}
)
print(json.dumps(pii_response, indent=2))
Signature
In order to authenticate properly with this endpoint, you must first request a .
See for message signing examples with more coverage and explanations.