Reva uses authentication per user. This allows the possibility to access multiple companies with the same credentials.
Once given access to the API product for at least one company, you can get an API key for your account by going to the Integrations option under the users dropdown.
To authenticate to the API, Reva uses Basic Authentication using your email and the API Key mentioned above.
Basic Authentication
Reva expects the Authorization header to be included in all API requests to the server.
To create the header you will need to first encode your accounts email and the authorization token using the Base64 format as follows:
# Base64.encode64("#{user_email}:#{user_api_token}")
# For example:
Base64.encode64('[email protected]:4xNh7LxH2x-P6N5uxwWKWorFpmR81g')
# This will result in this:
# "dXNlckBleGFtcGxlLmNvbTo0eE5oN0x4SDJ4LVA2TjV1eHdXS1dvckZwbVI4\nMWc=\n"
Once you have done that you can set the header as follows:
Authorization: Basic dXNlckBleGFtcGxlLmNvbTo0eE5oN0x4SDJ4LVA2TjV1eHdXS1dvckZwbVI4\nMWc=\n
