Difference between revisions of "Device flow usecase 1"
Pavel.lobko (talk | contribs) |
Pavel.lobko (talk | contribs) (→Google drive API) |
||
Line 8: | Line 8: | ||
;step 1 | ;step 1 | ||
− | :Execute command | + | :Execute command |
+ | I2REST COMMAND(*POST) URL('http://192.168.0.233:8080') BODY(*N '{"command" :"STATUS"}' 'application/json' *YES 1208) OUTPUT(*BOTH) TOKENS('/qsys.lib/qtemp. lib/tokens.usrspc') ASK(*REQUESTER) PROMPT(*REQUESTER) AUTHID(OAUTH21) AUTHPW(oauth21) AUTHURL('http://i2rest.com:22088/oauth2/device') TOKENURL('http://i2rest. com:22088/oauth2/access') SCOPE(manager_functions) | ||
;step 2 | ;step 2 | ||
:User Accept | :User Accept |
Revision as of 14:11, 6 April 2020
Google drive API
Lets walk step by step through our example with creating "i2rest.doc" file on "i2restexample" user's Google Drive
- Preparations
- At the very begining your application should be registrated as a client (obtaining Device ID and Device Password) on Google.
- Add SSL sertificate “google.com” to your DCM CLIENT.
- step 1
- Execute command
I2REST COMMAND(*POST) URL('http://192.168.0.233:8080') BODY(*N '{"command" :"STATUS"}' 'application/json' *YES 1208) OUTPUT(*BOTH) TOKENS('/qsys.lib/qtemp. lib/tokens.usrspc') ASK(*REQUESTER) PROMPT(*REQUESTER) AUTHID(OAUTH21) AUTHPW(oauth21) AUTHURL('http://i2rest.com:22088/oauth2/device') TOKENURL('http://i2rest. com:22088/oauth2/access') SCOPE(manager_functions)
- step 2
- User Accept