Authentication Types
To access the Revel API, you'll need an access token. This comes in two parts: the key and the secret. How you get this token depends on if your app is for your own usage or the public's usage.
Use our provided access token if you're using the API to access data in your own Revel environment.
Use OAuth if you're building a publicly available app that accesses other people's Revel data.
Access Tokens
You should use the given Access Token if:
- You want to use the API to interact with your own Revel app
- You have scripts to push or extra data from your Revel app
- You want to use the API to programmatically automate certain actions in your own Revel app
- The data you interact with programmatically is your own customer data
OAuth
You should use OAuth if:
- You are requesting access to other customers' Revel accounts and data
- The data you interact with programmatically is the data of other Revel customers
Setting Up OAuth
To set up OAuth, follow our tutorial here.
INSTRUCTIONS GO HERE
How to Use the Access Token
You can use your access token in two ways:
In the request header
In the request header, pass the key code and secret code as a header named API-AUTHENTICATION
. Separate the key code and the secret code with a colon. In this example, keycode is your key code and secretcode is your secret code.
API-AUTHENTICATION: keycode:secretcode
As a GET or POST variable
Alternately, you can pass the key code and secret code as parameters named api_key
and api_secret
in you request. In this example, keycode is your key code and secretcode is your secret code.
?api_key=keycode&api_secret=keysecret
For security reasons, https must be used for all API communication.
Updated about 5 years ago