App / Service Creation and API Access
Generating Application and OAuth 2.0 Credentials
Follow these steps:
- Create an Acenda account at https://www.acenda.com using the form on the homepage:
- Now, using the Acenda account you just created in the previous step, visit and login to https://developer.acenda.com.
- Create a new App
- Give your app a name, description, and short description.
- Here's a screenshot of a sample service (click to enlarge).
- Set visibility to private while you are in development
- Add your site to the list of sites that can subscribe to use this app. Note: If your site name has spaces in it then you must replace spaces with hyphens (eg. my-site-name). See screenshot below.
- Set access scopes for this app
- Click Save
- IMPORTANT: Presently, both private and public services must be approved by Acenda's IT Staff. Please use the Contact Us form to request activation of your service. Include your site name and service name in the request. We usually respond in a few hours.
- Subscribe to the app/service
- In a new tab, login to https://admin.acenda.com and select the site that you would like to use for testing.
- Navigate to 'Services > Service Library'
- Find your new service and click 'Add Service'
- Get an access token
- To find your client_id and client_secret, switch back to the https://developer.acenda.com tab and scroll to the top of your app’s information.
- If successful, you should receive a JSON object containing your access_token, its expiration duration along with some information about what scopes you may access.
- Make a POST request using curl or some other HTTP client to https://acenda.com/oauth/token with a JSON object containing grant_type, client_id, and client_secret as the payload. (Content-Type: application/json)
- Make an API call
- With the access token you generated in the last step you can now connect to any of the APIs that are allowed with your app’s access scopes on any site that is subscribed to the app.
To generate your OAuth 2.0 credentials you need to login to http://developer.acenda.com and create a new app. Give the app permission to whatever scopes you see fit and set the status to active. After the first save, the client_id and client_secret will appear at the top of the page.
You will then use those credentials to generate an access token by making a POST request to https://acenda.com/oauth/token. Pass client_id, client_secret, and send the grant_type as 'client_credentials'. You can use Postman to do OAuth 2.0 but it only works properly if you are not behind a firewall as postman's callback mechanism is not designed to be used otherwise.
You can just do two separate requests in postman without using their OAuth 2.0 setup. One request to generate the access_token and the other to make your api request. Once you have a valid access_token you can use it to access the apis on a given site until the token expires. You simply pass the access_token as one of the variables in the request. For documentation of our API’s, go to http://docs.acenda.com/ .
Related Article:
-
Shawn Joyce the correct url to get an authtoken ought to be https://acenda.com/oauth/token and it appears to take a day to get access to pull authtokens
Please sign in to leave a comment.
There are 1 Comments