Authenticate to Bloq API
This is a multi-step process:
- 1.obtain a nonce,
- 2.create a message,
- 3.sign it, and
- 4.send it back to receive an authentication token.
Note that the account must be enabled by the Bloq administrators as this is a permissioned service. Also note that the account is used to identify the user. It is not related to the validators and must be derived from a different mnemonic than the one used to create the validator keys.
Obtain the alphanumeric random nonce required to authenticate using the address of the account mentioned above:
curl -X POST https://api.bloq.com/auth/users/<PUBLIC_ADDRESS>/nonce
PUBLIC_ADDRESSmust be lowercase or in EIP-55 checksum format.
The response will be a JSON with the user nonce.
// Sample response
Using the copy icon, copy the authentication message below into your preferred text editor and insert your public address, nonce, and ISO time string.
api.bloq.com wants you to sign in with your Ethereum account:
Signing In With Ethereum on Bloq
Chain ID: 1
Issued At: <ISO_STRING_DATETIME_OF_SIGNING>
Using the copy icon, copy the message below into your preferred text editor and insert your public address, signature, and identical ISO time string. Send the message and obtain your authentication token. Note your authentication token will expire after 12 hours.
curl -X POST https://api.bloq.com/auth \
-H 'Content-Type: application/json' \