Api Call
After add external application and retrieve master secret token, next step is to generate access token which either can be valid for lifelong or limited time period, as per requirement, to be embed with short link of application raw media.
As this call intended to be consume by external or 3rd party application, we have provided a POST API call, with basic predefined data additionally needs master secret token of external application against which access token will be generated.
Domain :-
https://istudio.cogdam.secureanycloud.com
API End Point:-
https://istudio.cogdam.secureanycloud.com/app/token/generate
1) GET call:-
To generate a new temporary access token via a GET API call, use the above endpoint with the required parameters: token and expiry_in_hours. The value passed with 'token' should be the same as the one retrieved from the Applications External App Registration form by clicking on 'Generate Secret Token' or 'Update Secret Token.' 'expiry_in_hours' accepts only numeric values, representing the number of hours the temporary token will be valid. For example, to generate a token valid for the next 1 day, pass 24. If the token should not expire, simply send 0 for 'expiry_in_hours'.
ex.
In response user will received temporary access token, which can be consumed in short link calls
Received Empty Response?
In case you receives empty response for above api call, Please check what might be gone wrong,
1) Check API URL is correct.
2) Check SSL of external application from where API is initiated is valid (Only if integrated in external application, for browser hit, this will not applied).
3) Check Token is same as copied from application, no addition of any special character.
4) Check Token is active. i.e. if admin generate new token for external application, old secret token will become invalid. Only Active token will be passed in API to generate new access token.
5) Check whether value of 'expiry_in_hours' is valid positive finite number (0 or greater value).
6) Check whether external application itself is not disabled.
Case 1: open link with required parameters in browser
Case 2: Using any API call mediator, or application can initiate api call and get the response.
2) POST call:-
API Input data:-
JSON data type with below attributes
To generate a new temporary access token via a POST API call, use the above endpoint with the required parameters: token and expiry_in_hours. The value passed with 'token' should be the same as the one retrieved from the Applications External App Registration form by clicking on 'Generate Secret Token' or 'Update Secret Token.' 'expiry_in_hours' accepts only numeric values, representing the number of hours the temporary token will be valid. For example, to generate a token valid for the next 1 day, pass 24. If the token should not expire, simply send 0 for 'expiry_in_hours'.
Response:-
API will send success response with data object including access_token and date time till access token is valid. Here empty data in valid_up_to will be sent for lifelong token.
Prepare Media View Link:-
Above access token need to embed in media short link, which user retrieved from application single media page
Link which is retrieved from application
https://istudio.cogdam.secureanycloud.com/app/watch/cqzrn306?token=XXXX&e=YYYYY
Remember XXXX and YYYY part in below link is for only sample purpose which has to be replace with actual values as,
a) Replace token=XXXX with token=ACCESS_TOKEN_RECEIVED_FROM_API_CALL
b) Replace e=YYYY with e=EMPLOYEE_ID
e.x. https://istudio.cogdam.secureanycloud.com/app/watch/[code]?token=[temp access token]&e=[employee id]
now final url will be look like as
This link can be embed in external application player.
Not able to see Media?
In case viewer not able to view media, with above tokenized link, Please check what might be gone wrong,
1) Check Media Tokenized link is correct.
2) Check SSL of external application from where Media is requested is valid.
3) Check Token is same as received from API, no addition of any special character.
4) Check whether token is active, i.e. not expired or disabled.
5) Check whether external application itself is not disabled.
Last updated
Was this helpful?