Sessions API
The William Hill Sessions API uses a central authentication service (CAS*) on all resources that require access to a customer’s account or betting…
Media & content#openapi#entertainment
Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.
Overview
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.
Endpoints 4
Sessions
- POSTLogs in a customer and obtains an authentication ticket.
/tickets?fields=string&include=string&exclude=string&languageAsPerTerritory=trueLogs in a customer by obtaining an authentication ticket. It can then be used directly with the other William Hill APIs to access a customer’s sportsbook… - GETChecks the validity of a session ticket.
/tickets/:tgt?languageAsPerTerritory=trueChecks the validity of a session ticket. - DELETELog out a customer.
/tickets/:tgt?languageAsPerTerritory=trueLogs out a customer. - GETObtains a one-time Service Ticket that can be used to access other William Hill services.
/tickets/:tgt/serviceTicket?languageAsPerTerritory=true&target=string&fields=string&include=string&exclude=stringObtains a one-time Service Ticket that can be used to access other CAS enabled William Hill services that are not available through the standard suite of…
API details
- Base URL
https://sandbox.whapi.com/v2/sessions- Authentication
- None declared in the description
- Operations
- 4 operations on 3 pathsGET 2POST 1DELETE 1
- Main resources
- Sessions 4
- Description format
- Swagger 2.0, API version
2.0.0 - Links
- OpenAPI document · Support
- Listed from
- APIs.guru OpenAPI Directory (CC0-1.0)
Source updated
How to test the Sessions API in Swastik Codes
- Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
- Fork it into your workspaceChoose a workspace. You get your own copy of the Sessions API collection, without the publisher's secrets.
- Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
- Send a requestPick an endpoint, for example “Logs in a customer and obtains an authentication ticket.” (POST /tickets?fields=string&include=string&exclude=string&languageAsPerTerritory=true), and press Send. Check the response, add tests and run the whole collection with the runner.
Frequently asked questions
What is the Sessions API?
The William Hill Sessions API uses a central authentication service (CAS*) on all resources that require access to a customer’s account or betting… It is listed under Media & content and has 4 endpoints.
Who publishes the Sessions API?
It is listed from Whapi's public API description (an OpenAPI document), not published by Whapi on Swastik Codes. Anyone who controls whapi.com can claim the profile by adding a DNS TXT record.
What is the base URL of the Sessions API?
Requests go to https://sandbox.whapi.com/v2/sessions. Endpoint paths are added to this base URL.
How do I authenticate with the Sessions API?
Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.
How many endpoints does the Sessions API have?
4 operations on 3 paths (2 GET, 1 POST, 1 DELETE). The largest groups are Sessions.
Is forking the Sessions API free?
Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.