Device Flow Usecase
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