Microsoft One Drive Storage
Step 1: If you have created an account with Microsoft Application Registration Portal(https://apps.dev.microsoft.com/?referrer=https:%2F%2Fdev.onedrive.com%2Fapp-registration.htm#/appList), login, else Signup
Step 2: Click on Add an App
Step 3: Enter your application name and click Create
Step 4: For Redirect URL ‘https://app.empmonitor.com.in’
URL:
Step 5: Click on Register button.
Step 6: Then you will get your your Client Secret Key
Step 7: Then go to Certificate and secret then click on New client id then you will get the secrete id
Step 8: Then open the link by replacing client ID:
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=b1feea46-d59c-4d65-bebe-4dabe2db766b&response_type=code&redirect_uri=https://app.empmonitor.com.in&scope=files.readwrite offline_access
Step 9: Then sign in again
13. Click on Yes
14. Then you will get the code and save it for further use.
15.Open postman create a collection and create a get request
1. For get method
===============>
https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=$%7Bclient_id%7D&response_type=code&redirect_uri=https://app.empmonitor.com.in&scope=files.readwriteoffline_access
2.Then go to body x-www-form-urlencoded..Click on bulk edit and paste these parameters :-
------------------------>
client_id:${client_id}
response_type:code
redirect_uri:https://app.empmonitor.com.in
scope:files.readwrite,ofline_access
16. For Post method
1. Use this link
https://login.microsoftonline.com/common/oauth2/v2.0/token
2.Then go to body x-www-form-urlencoded..Click on bulk edit and paste these parameters
client_id:${client_id}
client_secret:${the secure key }
redirect_uri:https://app.empmonitor.com.in
code:${code}
grant_type:authorization_code
17.Edit the following data as shown
18.Send the request.You will get a refresh token as shown
19. Again if you want to create refresh token .Create a post request.
POST: https://login.microsoftonline.com/common/oauth2/v2.0/token
— body x-www-form-urlencoded
client_id: ${client_id}
client_secret: ${the secure key }
redirect_uri: https://app.empmonitor.com.in
refresh_token: ${previous requested refresh token }
grant_type: refresh_token
19. Edit the above details in the parameters.
20. Please fill in the client id ,client secret id and refresh token in the storage in dashboard and activate the storage.
FYI :- After getting the code,you can directly go for the post method