API GATEWAY - API ACCESS

Open Endpoints
curl -H "Accept: application/vnd.scapig.1.0+json" http://api.scapig.com/hello/world
Application Restricted Endpoints
curl -H "Authorization: Bearer [SERVER_TOKEN]" -H "Accept: application/vnd.scapig.1.0+json" http://api.scapig.com/hello/application
Replace the SERVER_TOKEN by your application server token.
User Restricted Endpoints

1. User logs in and grant access

http://api.scapig.com/oauth/authorize?client_id=[CLIENT_ID]&response_type=code&scope=read:hello&redirect_uri=http://[REDIRECT_URI]

2. Create a token from the authorization code

curl --data 'client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&grant_type=authorization_code&authorization_code=[AUTHORIZATION_CODE]' http://api.scapig.com/oauth/token

3. Call the API

curl -H "Accept: application/vnd.scapig.1.0+json" -H "Authorization: Bearer [ACCESS_TOKEN]" http://api.scapig.com/hello/user
Replace the CLIENT_ID, CLIENT_SECRET, REDIRECT_URI by your application's.