Amadeus test.api.amadeus.com/v2/shopping/hotel-offers and other api V2 hotel api return a 401 invalid access token - amadeus

I'm working on a hotel booking application, and trying to integrate amadeus api. I'm using the test api base url https://test.api.amadeus.com
when sending a request for flight-offers i get the response and the token is valid.
But when i'm trying to use the hotel-offers end point with the same token(before it expires in 30 mins) it returns a 401 message.
https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=LON&destinationLocationCode=NYC&departureDate=2022-01-16&adults=1&travelClass=ECONOMY works
flight offers endpoint
https://test.api.amadeus.com/v2/shopping/hotel-offers?cityCode=LON&checkInDate=2022-01-05&checkOutDate=2022-01-07 does not work
hotel offers endpoint
i know that a token expires after 30 min and took that into consideration.
Is there a problem with this endpoint:
https://test.api.amadeus.com/v2/shopping/hotel-offers

Related

How can i send minimum requests to Gravitee?

I need to send 2 request via Gravitee: 1 for get Token from an API and then i can read/write/update with the API. How can i do it with the minimum request to Gravitee?

Ameritrade API to get account value

Is there an API call to Ameritrade services to pull account value? I don't need other data, just how much is in my account (total). What is the URL and how do I authenticate?
You can find all of this information in their developer docs. Additionally, they have a simple UI where you can test request and generate request/responses.
https://developer.tdameritrade.com/apis
Use the Authentication method to get oAuth bearer token. This token will be used in a request header to access other APIs such as Get Account.
https://developer.tdameritrade.com/authentication/apis/post/token-0
Get Account endpoint to access balances, positions, and orders for a particular account
https://developer.tdameritrade.com/account-access/apis/get/accounts/%7BaccountId%7D-0

Getting Paypal API response

I am trying out the PayPal API Developer Account, and am in the midst of creating a test payment. I have followed the steps stated here.
However, what I want to do is to extract the JSON response from the orders API, in which I would be using in Tibco. The request has been successfully made and is reflected in the Sandbox account. But I am unsure how I can obtain the URL that returns the JSON response from the orders API.
I am new to Paypal API integration and I would really appreciate any help provided.

AccessTokenRefreshError : Gdata Spreadsheet API with Service Account

First some background, Using Service Accounts with GData Spreadsheet API for an app installed via Google Apps Marketplace.
credentials = SignedJwtAssertionCredentials(
SERVICE_ACCOUNT_EMAIL,
PRIVATE_KEY,
scope = SCOPE,
sub = "admin#domain.com")
auth2token = gauth.OAuth2TokenFromCredentials(credentials)
client = SpreadsheetsClient()
auth2token.authorize(client)
q = SpreadsheetQuery(title= "ItemMaster",title_exact=True,)
feed = client.get_spreadsheets(query = q)
The problem is that the API calls fail randomly with,
AccessTokenRefreshError: Invalid response 403.
Failed to retrieve access token: You are not authorized to perform this request.
I tried doing a test in which 10 API calls are made one after another with 1 second intervals between them, atleast 4 API calls failed with the above error.
I tried checked the quota on API console and that is not being exceeded, Per user limits on the API are at 100 requests/user/second for the Drive API, and billing is enabled.
PS: This question is different from Getting AccessTokenRefreshError: invalid_grant in Google API fro service account and Google API Python Client - AccessTokenRefreshError which are related to invalid_grant while my issue is specifically related to Random Failures of API calls
EDIT: The problem seems to be related to #210 in google-api-python-client

Why I get a 400 bad request with an auth request to Twitter?

This is the resource I calling for:
https://api.twitter.com/1.1/statuses/user_timeline.json&count%3D2%26oauth_consumer_key%3DVnNeRUCEZAEQFgSR6j7RA%26oauth_nonce%3D47ce3f3bc553afa24qwwWsa6d651d697407d279%26oauth_signature_method%3DHAS12MAC-SHA1%26oauth_timestamp%3D13739599ASdas95%26oauth_token%3D1041as30304-HEYQ1S65ybBYP2J1Xey1sK7xql1nyU2ykZDr9txA%26oauth_version%3D1.0%26screen_name%3DMyAgency
but I get an empty page with NetworkError: 400 Bad Request.
Where am I wrong? And where do I check this?
This status code will be returned during version 1.0 rate limiting. In API v1.1, a request without authentication is considered invalid and you will get this response.
If you're using version 1.0 - The Twitter API only allows clients to make a limited number of calls in a given hour. This policy affects the APIs in different ways.