1 Minute Read
Oauth/token is the POST API for retrieving token for authentication by the external API User to be part of the 75F Platform and further use other APIs in the system. It is basically the Client Application credentials. The token provided here expires with 24 hours and it needs to be re-activated to access other APIs. So the refresh rate for this token renewal is 24 hours.
Name : Content-Type
Required : True
Note: The parameters passed above in the query is:
Client ID : Username which is part of 75F Facilisight App that provides access to the Developer for a certain set of buildings
Client Secret : password that is used with the 75F system mentioned about
Response: 200 OK
The provided credentials are valid and an OAuth token was successfully created.
Response: 401 Unauthorized
Invalid credentials provided
Procedure to Generate a Token
From the Developer portal home page
- Click the Profile option.
The user profile screen is displayed with the user details, and the details related to the subscriptions subscribed for.
Under the products subscribed for, locate the subscription key for the relevant product.
For this example we are trying use the product Product Production Readonly subscription.
- Click the option show to view the subscription keys or simply copy the subscription key to be used to generate the Bearer token.
- Click the API's option on the top.
The API's screen is displayed with the list of API's the user is authorized to use.
- Click the API 75F Auth.
The 75F Auth API screen is displayed with the details about the API.
- Click Try it to access the API.
The Try it window to try the API and generate the bearer token in displayed.
- Select the Primary: Product Production Readonly Subscription under the subscription key field.
- Paste the subscription key copied from the profile screen into the header option Ocp-Apim-Subscription-Key.
Scroll further to locate the Body section as shown below
Enter the user credentials in the format specified, parts of the id and password are masked for security purpose.
as shown below.
Where the user email ID replaces user&client and the password replaces pass
- Click Send to send the request and generate the bearer token.
The response is generated.
The Bearer token is generated as show below along with the response.
- Copy the bearer token and use the same in the other API requests.