Every customer can have one or more customer tokens. The token gives you unlimited access to all the API endpoints on behalf of any user visiting the site.
How it works: once you obtain a token, you can send a request like
curl 'https://public-api.wazoku.com/api/v1/challenges' -H 'Authorization: Token <token>:<user_id>'
WARNING: the token should never be used within client-side apps such as mobile, desktop or browser applications, it's only intended for secure server-to-server communication.
Login to the Spotlight domain as Admin.
Register the application at https://<spotligh_domain>/oauth2/applications/register/
Specify the below parameters when creating a new application -
A client id and client secret is automatically generated for the app.
Please note that the registered app will be linked to the spotlight domain used to create the app.
Spotlight provides OAuth2 support. Once you authenticate and generate a new user token, you can use it to make requests
The authorization endpoint is https://<spotlight_domain>/oauth2/authorize/
Submit a GET request to the authorization end point - https://<spotlight_domain>/oauth2/authorize/?client_id=<client_id>&response_type=code&redirect_uri=<redirect_uri>
User needs to follow the autorization flow in the browser.
Once Spotlight has successfully authenticated the user, a dialog will prompt the user to authorize the app. If the user clicks "Allow", app will be authorized. The OAuth 2 dialog will redirect the user's browser via HTTP 302 to the redirect_uri with an authorization code: http://[:redirect_uri]?code=[:code].
The token endpoint is https://<spotlight_domain>/oauth2/token/.
Submit a POST request to the token endpoint with the below parameters -
An access_token is returned in the response which can be used to make further request to the API.
OAuth2 provider issues tokens to users directly, so the token has information about the user. This token can then be stored in user storage (e.g. mobile phone).
In most cases, listing endpoints allow you to order the results and filter them.
For ordering, use
order parameter. It usually accepts at least
To reverse the order, just put
- before it (e.g.
For filtering, lots of options are available. For example, to filter ideas by number of
num_comments parameter. Its format:
minimal or maximal value can be omitted.