Hi,
I am a developer who is currently in the process of updating an application for a vendor from API6 to API-NG.
One area I need to cover is that of subscription activation. I am a little confused as to what is the best practice for implementing this process in the app.
The description of the process is outlined on the Betfair developer site here:
https://api.developer.betfair.com/se...ices+in+API-NG
This states that "The activateApplicationSubscription service should be used in conjunction with the interactive login method. See sample code here"
The sample code does not include any reference or call to activateApplicationSubscription so I don't see how it is demonstrating the process at all!
That aside, let's say my app starts up and the user logs in to Betfair via the webpage and the app obtains the session token. That's fine. Now how does the app know that the user is not subscribed to the app's APPKEY and therefore should be prompted to enter his subscription token? Should it make a call to a function like getAccountFunds and check for error DSC-0037? Thats's messy. Or should it call listAccountSubscriptionTokens and check that the user has one for the associated applicationName that is ACTIVATED? Or am I missing something else?
Any advice on best practice would be much appreciated.
Thanks
Kevin
I am a developer who is currently in the process of updating an application for a vendor from API6 to API-NG.
One area I need to cover is that of subscription activation. I am a little confused as to what is the best practice for implementing this process in the app.
The description of the process is outlined on the Betfair developer site here:
https://api.developer.betfair.com/se...ices+in+API-NG
This states that "The activateApplicationSubscription service should be used in conjunction with the interactive login method. See sample code here"
The sample code does not include any reference or call to activateApplicationSubscription so I don't see how it is demonstrating the process at all!
That aside, let's say my app starts up and the user logs in to Betfair via the webpage and the app obtains the session token. That's fine. Now how does the app know that the user is not subscribed to the app's APPKEY and therefore should be prompted to enter his subscription token? Should it make a call to a function like getAccountFunds and check for error DSC-0037? Thats's messy. Or should it call listAccountSubscriptionTokens and check that the user has one for the associated applicationName that is ACTIVATED? Or am I missing something else?
Any advice on best practice would be much appreciated.
Thanks
Kevin


Comment