Getting bearer token
In [1]:
Copied!
from sfapi_client import AsyncClient
from pathlib import Path
key = Path("/path/to/sfapi_key.pem")
async with AsyncClient(key=key) as client:
token = await client.token
print(token)
from sfapi_client import AsyncClient
from pathlib import Path
key = Path("/path/to/sfapi_key.pem")
async with AsyncClient(key=key) as client:
token = await client.token
print(token)
eyJraWQiOiJST3AzIiwidHlwIjoiYXQrand0IiwiYWxnIjoiUlMyNTYifQ.2oEEDDpuySRjIuy4XstdiWt3mnHLtw0cgqUOzm9oAp1Vb3aY2HPRbUj4yIIP9BwHb3r5AxNHTYomFyffyhVLt3pdqymXS4ZzffUJRYF85hByWeJrmt6eZz87C4R0bDppE7sM7MxAepSQt7YxwO4neVkiy7DeitwNh0a7MYISfR9OiTcGfXm681JTi5rnKyzXueSuaPxPiVLswWggGJOGwH0XHQY9KYI33G4LgrBkXuRSZ2htfDbInZo9BVUW8NOd0RfZSPpEpaCGPNP17WY1RdMXw5ahSOMKBZGsjjTjH9oKolxw.bOiTj4tALM9PXOeNuOeunYRaFXrMA7jGi9yNCErB3HdgavgNnFd2qrhJiybgItQTmZwKrLFhau6qgJI6f7hnMkvlzW8u6y3LftUK3b2eLcGoYFh5eZKFz1lmyfRvwqsBGyfGhegMlHQZKhSgopTJZJTxofrA5jAfqmrQ6jCECCoA16bWik0NsGNl1pjitOgVdj9jPdjrWvRofmqQaFfL4KCtqA8vjkgJjppCO7JlAVtGUuSxGJhfFG8R3otJzmT1JmE3RHYOCFk6MgpBPQX9FWz2XFVHnEr3onm571BMKVDZuDPAL9P8PKEkr1IMMrXjOJqC6A3tzcTXo3iB7GnnDl
To use the token, click on Authorize
and paste the token into the box as the value, and click Authorize
.