1 Minute Read
| Oath/Token
A POST API for retrieving tokens for authentication by the external API User to be part of the 75F Platform and further use other APIs in the system.
The Client Application credentials expire within 24 hours and require reactivation to access other APIs.
| Request
POST https://api.75f.io/oauth/token
| Request headers
Name: Content-Type
Required: True
| Request body
grant_type=client_credentials&client_id=user&client_secret=pass
The parameters passed in above query:
Client ID: 75F Facilisight username
Client Secret: 75F Facilisight password
Response: 200 OK
Success, credentials are valid, and an OAuth token is generated successfully.
application/json: {"access_token":"df7asd8f6as6df678as6df7astdrfasf67as8df7gyhasidv","token_type":"bearer","expires_in":"3600"}
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 displays the user and subscription details.
- Locate the subscription key for the relevant product.
For this example, we use the product Product Production Readonly subscription.
- Click the option shown 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 displays the list of authorized API's
- Click the API 75F Auth.
The 75F Auth API screen displays the API details.
- Click Try it to access the API.
The Try it window to try the API displays.
- 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 "grant_type=client_credentials&client_id=abcdefg@75f.io&client_secret=xyz@0869", (parts of the id and password masked for security purposes).
Note: The user email ID replaces user&client and the password replaces the pass
- Click Send to send the request and generate the bearer token.
The response generates as below.
The Bearer token is generated as shown below along with the response.
- Copy the bearer token and use the same in other API requests.
Comments
0 comments
Please sign in to leave a comment.