Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
API-NG Reference Guide - 20th October2014.pdf
Скачиваний:
91
Добавлен:
11.02.2015
Размер:
2.41 Mб
Скачать

You should upload the .crt file exported to the My Security page on Betfair.com to allow this certificate access to your account.

Interactive Login from a Desktop Application

Overview

Interactive login is to be used when the user is present to login (for example, 3rd Party Desktop Applications) and will manage any additional information required at login depending upon a customer's account (such as 2 Factor Authentication codes or National Identifiers).

This is achieved by embedding the Betfair IdentitySSO login page in your application and then obtaining a successful session token upon login. The keep alive operation should be called within the 20 minute session expiry time if the user is still actively using your application. The embedded login page initially looks like this:

Interactive Login White-listing

Use of the Interactive Login requires your App Key to be white-listed. To get your App Key white-listed you should send an e-mail to via Support > Create A Support Ticket and provide your Application Key/s and Application Name as well as details of your intended use of the interactive login,(i.e. whether this is for personal use or for an application that you intend to distribute to Betfair customers under the terms of the Software Vendor licence).

The interactive login sequence looks like this:

Obtaining the sessionToken (productToken) from the POST data

Once a login has been successfully made, the javascript in the page will POST the session token to the URL provided as a redirect URL. For a desktop application, this is not required to be a real page as the Desktop application can intercept the POST request as it happens via the embedded browser container. A windows based application can embed a Web Browser into the application and use the BeforeNavigate2 event to catch the post data sent to the redirect URL and there are platform specific alternatives. The POST request body will contain two URL encoded parameters (which you will need to URL Decode):

loginStatus - A code which will either be 'SUCCESS' or an error code from the table below. productToken - This is your session token and should be attached to requests made to API-NG in the X-Authentication header.

This flow protects the implementing application from user login complexities, such as 2 factor auth, requiring national identifiers or jurisdictional migrations.

loginStatus

ACCOUNT_ALREADY_LOCKED ACCOUNT_NOW_LOCKED AGENT_CLIENT_MASTER AGENT_CLIENT_MASTER_SUSPENDED BETTING_RESTRICTED_LOCATION

CERT_AUTH_REQUIRED

CHANGE_PASSWORD_REQUIRED CLOSED DANISH_AUTHORIZATION_REQUIRED DENMARK_MIGRATION_REQUIRED DUPLICATE_CARDS

INVALID_CONNECTIVITY_TO_REGULATOR_DK

INVALID_CONNECTIVITY_TO_REGULATOR_IT

INVALID_USERNAME_OR_PASSWORD ITALIAN_CONTRACT_ACCEPTANCE_REQUIRED KYC_SUSPEND NOT_AUTHORIZED_BY_REGULATOR_DK

NOT_AUTHORIZED_BY_REGULATOR_IT

PENDING_AUTH

PERSONAL_MESSAGE_REQUIRED

SECURITY_QUESTION_WRONG_3X

SECURITY_RESTRICTED_LOCATION SELF_EXCLUDED

the account is already locked

the account was just locked

Agent Client Master

Suspended Agent Client Master

the account is accessed from a location where betting is restricted

Certificate required or certificate present but could not authenticate with it

change password required

the account is closed

danish authorization required

denmark migration required

duplicate cards

the DK regulator cannot be accessed due to some internal problems in the system behind or in at regulator; timeout cases included.

the IT regulator cannot be accessed due to some internal problems in the system behind or in at regulator; timeout cases included.

the username or password are invalid

The latest italian contract version must be accepted

KYC suspended

the user identified by the given credentials is not authorized in the DK's jurisdictions due to the regulators' policies. Ex: the user for which this session should be created is not allowed to act(play, bet) in the DK's jurisdiction.

the user identified by the given credentials is not authorized in the IT's jurisdictions due to the regulators' policies. Ex: the user for which this session should be created is not allowed to act(play, bet) in the IT's jurisdiction.

pending authentication

personal message required for the user

the user has entered wrong the security question 3 times

the account is restricted due to security concerns

the account has been self excluded

SPAIN_MIGRATION_REQUIRED SPANISH_TERMS_ACCEPTANCE_REQUIRED

SUSPENDED

TELBET_TERMS_CONDITIONS_NA

TRADING_MASTER

TRADING_MASTER_SUSPENDED

Interface

Login

URL definition

International users:

spain migration required

The latest spanish terms and conditions version must be accepted

the account is suspended

Telbet terms and conditions rejected

Trading Master Account

Suspended Trading Master Account

https://identitysso.betfair.com/view/login?produ

Italian jurisdiction users:

https://identitysso.betfair.it/view/login?produc

Please note that all method names are case sensitive, this includes login, keepAlive and logout.

Parameters

 

 

Name

Description

Sample

product(mandatory)

The product for which the login

"IhDSui3ODdsdwo"

 

page is used and on which the user

 

 

will do the login; This should be

 

 

your application key.

 

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]