API Sessions API
Consulte Sessions API, do provedor whapi.com, versão 2.0.0: documentação, especificação OpenAPI 2.0 e referências para planejar a integração.
whapi.com · Versão 2.0.0
Conheça a plataforma
O que integrar com Sessions API
Descrição técnica preservada da especificação de origem. A versão do contrato ajuda a identificar a API; confirme a disponibilidade atual no fornecedor.
The William Hill Sessions API uses a central authentication service (CAS*) on all resources that require access to a customer’s account or betting functionality. To authenticate, you’ll need to supply a sportsbook username and password, in return you will be given an authentication ticket, which you can use on the majority of requests found within our services. The Sessions API should be used whenever you want to login a customer and: continue to use the William Hill API for that customer’s transactions use other CAS-enabled William Hill services outside the suite of APIs CAS is an enterprise Single Sign-On solution for web services (see https://wiki.jasig.org/display/CAS/Home). It is used by many William Hill services. Note: all requests must be executed over HTTPS and include an API key and secret. Authentication Ticket Expiration Times When a customer is logged in using the Sessions API, they are given an Authentication Ticket; using this ticket on subsequent API requests gives you access to account activities (such as placing a bet, deposits, etc). However, this ticket is only valid for a given period of time depending on how it is used. If the ticket is used and then has a period of inactivity longer than 7,200 seconds (2 hours), then the ticket will expire and further requests using the ticket will be denied - in effect, a customer has been logged out and will need to authenticate again. Normally, any ticket issued only has a maximum life expectancy of 28,000 seconds (8 hours) after which it can no longer be used, even if it has been used regularly. The customer again will be effectively logged out and will need to authenticate again. If you wish to avoid this, you need to set the query parameter extended to Y, which will enable your application to generate a ticket valid for 60 days without expiring due to inactivity.
Ficha técnica
Como funciona a integração
Versões, permissões, preços e limites podem mudar. Consulte a documentação da plataforma antes de implementar.
Do planejamento à produção
Checklist para integrar Sessions API
- Defina o fluxo. Identifique quais dados precisam circular, o sistema de origem e o resultado esperado.
- Leia os requisitos oficiais. Verifique acesso à API, plano necessário, versão e ambiente de testes.
- Configure o acesso com segurança. Guarde credenciais secretas no servidor e conceda apenas as permissões necessárias. Restrinja chaves públicas conforme a documentação do fornecedor.
- Teste a primeira requisição. Valide os campos, a paginação e o formato de resposta com dados de teste.
- Prepare o tratamento de falhas. Considere limites de requisição, retentativas com espera e prevenção de operações duplicadas.
- Acompanhe a integração. Registre erros sem expor dados sensíveis e monitore alterações na API.