How to authenticate

This section shows two way to authenticate to the API.

Authentication [Keys]

You may have noticed two parameters(app-key, account-key) in the request header. Every API requests requires an app key (app-key) and most of them require the account key (account-key) to identify which account the request will act on. To obtain an app key contact us through our partners space.

Example:

curl -X POST \
  http://file.asisprojetos.com.br/api/v1/upload \
  -H 'account-key: 4e07408562bedb8b60ce05c1decfe3ad16b72230967de01f640b7e' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
    

Authentication [Token]

It is possible to interact with the API using a user registered on an account. To get a token, submit a request with your credentials. Token expires in 20 minutes of inactivity.

Request

curl -X POST \
      https://auth.asisprojetos.com.br/ \
  -H 'Content-Type: application/json' \
  -H 'app-key: 6b86b273ff34fce19d6b804eff5a3f5747ada4eaa22f1d49c01e52ddb' \
  -d '{
	    "login": "email@parceiro.com",
	    "senha": "1as21df32A*"
    }'
    

Response

{
    "token": "eyJlbmMi6d1fa5s14R0NNIsdfasdfaiwiYWxnIjoiZGlyIn0..."
}
    

Next steps

The next section shows more about the types of uploads available with Asis API.