Can someone share the PHP script for login authentication? I need code to a. make a get request to the login endpoint and receive the request token b. make a post request for authentication to session/token endpoint
I am actually able to make these calls, however i am receiving {"status": "error", "message": "Invalid session credentials", "error_type": "TokenException"}
I am also certain that the values that i am posting are correct.
Your redirect_url (website) can store the token and the Java app can communicate with it and fetch it.
But, the best way would be to open the login flow in a WebView in Java. redirect_url can be whatever. Your Java app can watch the WebView's URL and when it changes to your expected redirect_url, you can just extract the request_token from the URL string and close the webview.
In the meanwhile, if you paste your PHP code here, we may be able to debug.
I am glad to hear that you are working on an API. Do you mind sharing it right now so i can beta test it?
thanks
Rajnish
Assuming your redirect_url is a PHP script, you can just use $_GET['request_token'] to get it from the query parameters in the URL.
if i am using a standalone java application, how will i get the request token to my java application ? any logic to solve this issue ?
One more thing, i have a redirect_url which is not a localhost, but it's to my web url .
But, the best way would be to open the login flow in a WebView in Java. redirect_url can be whatever. Your Java app can watch the WebView's URL and when it changes to your expected redirect_url, you can just extract the request_token from the URL string and close the webview.
And redirect-url can be anything