Difference between revisions of "Personal/Test OAuth Token Generation"
From Active911 Documentation Wiki
Jonathan.woo (Talk | contribs) |
Jonathan.woo (Talk | contribs) (→Setup) |
||
Line 6: | Line 6: | ||
==Setup== | ==Setup== | ||
− | [[File: | + | [[File:OAuth_Settings.jpg|left]] |
#Go to https://developers.google.com/oauthplayground/ | #Go to https://developers.google.com/oauthplayground/ | ||
#Click the Gear in the top right corner to change the settings to point at our servers. | #Click the Gear in the top right corner to change the settings to point at our servers. | ||
Line 13: | Line 13: | ||
#*Change "Token endpoint" to "https://access-or.active911.com/interface/open_api/token.php" | #*Change "Token endpoint" to "https://access-or.active911.com/interface/open_api/token.php" | ||
#*Change "OAuth Client ID" to "self" | #*Change "OAuth Client ID" to "self" | ||
− | |||
==Generating an authorization code== | ==Generating an authorization code== |
Revision as of 13:09, 14 February 2014
Users can generate Oauth Tokens codes for personal use as long as they have Edit Agency permission for that agency.
This does not require pre-registration of a developer account.
You must use the Google OAuth2.0 Playground to generate an access token and a refresh token.
Setup
- Go to https://developers.google.com/oauthplayground/
- Click the Gear in the top right corner to change the settings to point at our servers.
- Change "OAuth endpoints" to "custom"
- Change "Authorization endpoint" to "https://access-or.active911.com/interface/open_api/authorize_agency.php"
- Change "Token endpoint" to "https://access-or.active911.com/interface/open_api/token.php"
- Change "OAuth Client ID" to "self"
Generating an authorization code
- In Step 1 of the Google OAuth webpage, enter the scope you want to apply to the tokens you are generating. For more information on Scope, click here
- Click the "Authorize APIs" button. You should be brought to a page which will allow you to select which Agency you want to generate the tokens for.
- Select an Agency and click 'Submit'. After selecting an agency, you will be prompted to confirm your authorization.
- Click 'Yes'.
- After confirming your authorization, you will be brought back to the OAuth2.0 Playground where the Authorization Code will be entered under Step 2 of the Google OAuth webpage for you.
Accessing the API
- Exchange the Authorization Code for a Refresh Token and an Access Token in Step 2 of the Google OAuth webpage.
- Once you exchange your code for tokens, you can use Step 3 of the Google OAuth webpage to access our api.
- Start with the url "https://access-or.active911.com/interface/open_api/api/" (Note the last backslash in required)
- Other API calls can be found here