You are on page 1of 3

Diners Club API data fetching screen shots

1. Call for Token generation:Request:--https://dinersclubfeed.com/api/v1/users/token.json?


username=infiniacs&password=5S8ZXSME0WmgZVDy
Response:--

As we can see we have got following response in above code


Token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9kaW5lcnNjbHVi
LmNvbSIsImlhdCI6MTQ1NjIyNjQ2OSwiZXhwIjoxNDU2MjQwODY5LCJ1aWQiOiJpbm
ZpbmlhY3MiLCJzY29wZXMiOlsib2ZmZXJzIl19.1CY3TrMphekOYHmd13nKy6DJavTR
HQIrjgE97tPHcN4
Username: Infiniacs
Name: Tulika Maheshwari
Scopes: Offers

But by entering the same token on sample link, we get the response with
endAPI urls:-

2. Call for offer data by passing updated_since=2016-01-01 as a parameter:Request URL:


https://dinersclubfeed.com/api/v1/offers.json?updated_since=2016-01-01
Request Header:
Authorization: Bearer
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC9kaW5lcn
NjbHViLmNvbSIsImlhdCI6MTQ1NjIyNjQ2OSwiZXhwIjoxNDU2MjQwODY5LCJ1
aWQiOiJpbmZpbmlhY3MiLCJzY29wZXMiOlsib2ZmZXJzIl19.1CY3TrMphekOY
Hmd13nKy6DJavTRHQIrjgE97tPHcN4

Response Error:

Error Message: The remote server returned an error: (405) Method Not
Allowed

You might also like