Upvest API
Introduction
The purpose of this document is to describe the necessary steps to connect your application to our API.
We have a REST-like API and use JWT tokens as the authentication method. The tokens are issued by Auth0 which is an authentication-as-a-service service and serves as an authentication provider.
Example
You can see an example application implementing Upvest API on https://github.com/upvest-cz/upvest-api-example
Steps
Send an email to petr.volny@upvest.cz with the following:
- Name of your application
- Type of your application (Regular web app / Single-page app / Native app / Machine-to-machine app) as per https://auth0.com/docs/applications
- Allowed callback URL(s)
- where your users will be redirected after authentication
- Allowed logout URL(s)
- where your users will be redirected after logging out
- Allowed web origin URL(s)
- which URLs will you be firing your requests from
- used for CORS
We'll get back to you and provide you with the following:
- Auth0 Client ID
- Auth0 Client Secret (if required for your application type)
- Auth0 domain
Now you have everything you need to start authenticating Upvest users in your application at your disposal. Head to https://auth0.com/docs/quickstarts/ to learn about how to wire up Auth0 with the application type of your choice.
Once you're done with setting up Auth0 with your application, you can proceed to making requests to the Upvest API. In order to create an authenticated request, make sure to send along the following cookies:
- `id_token` with the Auth0 ID token
- `access_token` with the Auth0 access token
- `Accept: 'application/json'`
- `Content-Type: 'application/json'`
Awesome! You're now ready to build an application on top of the Upvest API!