Skip to content

Authentication

Fundipedia provides the ability for you to communicate with the API via JWT bearer tokens. A bearer token allows developers to have a secure point of entry for using the Fundipedia API, and are one of the core features of OAuth 2.0.

Authentication tokens are passed using an auth header, and are used to authenticate as a user account with the API:

curl -X GET "https://demo.api.fundipedia.com/api/fund" -H  "Authorization: bearer {token}"


Request an API key and secret

Before you can request a token you first need to generate an API key and secret from the API developer portal (Note: You will need a valid Fundipedia user account to generate an API key). Here you can create new keys or edit/delete existing keys. When creating a key, you will be shown a secret that pairs with that key, however be sure to take note of this secret as it will only be shown to you once.

Request a token


To request a token, you will need to post up to the token endpoint  /api/token/request and supply your API key and secret. The body of this request will need to be supplied in the following format:

{
    "api_key": “yourKey”,
    "api_secret": "yourSecret"
}

Once you have requested a token you should receive a response that is in the following format:

{
    "access_token": “eyJhbGciOiJSUzI1NiIsImtpZCI6ImE4NDNiNGUzNWJkODk0M”,
    "expires_in": 3600
}

The expires_in field in the response will return the number of seconds until the access token will expire.

Using the token

The access token received can then be used to make requests to the API. To make any requests to the API you will need to include your access token in an Authorization header. When supplying an Authorization header, you will need to make sure it is in the following format: “Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6ImE4NDNiNGUzNWJkODk0M”.

Below is an example API request:

curl -X GET "https://demo.api.fundipedia.com/api/fund" -H  "Authorization: bearer {token}"  



Feedback and Knowledge Base