In order to use the Analytics API a proper authentication token needs to be provided, this can be done either by using a session token or by using an API key by specifying this in the requests header.
In order to find our session token you need to be logged in to the Customer Portal, after that you can right-click on the screen and select inspect. Navigate to application and then search for sessionToken to find your token.
Once you have you token you can send this in as a BEARER token when doing requests to the API in order to authenticate.
The second way of authenticating is by using an API key, this process can be found here: Managing API keys