Bargain Finder Max - sabre

I am trying to implement Bargain Finder Max API in ASP.NET application. For accessing the API we need a token. I tried generating the token using Postman but it always returns 400 (bad request). We have created Base64 string as mentioned in https://developer.sabre.com/docs/rest_apis/session_management/token_create_api/v2/reference-documentation# but still it always returns 400.
Further we tried using the token generated using our default credentials "DEVCENTER:EXT" domain. Using the token generated with these credentials we are getting results but they doesn't seem to be right. The response shows flights which are no longer operational by the Airline.
We have been struggling on this from last 3-4 days but not sure what we are missing.
1.) Do we need some specific LoginID/PassWord/PCC to access Bargain Finder Max API
2.) Or we are not using correct API to get the desired results.

Yes, you need a credential (login/password/iPCC) to be able to generate this token to be used in BFM or any other SABER web service.
In this case, you need to contact the travel agency or Saber commercial contact and request a developer access credential.
https://developer.sabre.com/user/register
https://developer.sabre.com/guides/travel-agency
https://developer.sabre.com/contact/developers_contact

Related

403 Forbidden "These credentials do not authorize access" for HERE Geocoding & Search API

Currently working on building an address validator for a project I am working on, currently using a HERE account with a credit card attached for usage with the HERE Geocoding and Search API.
A minimal example to get started, a request to https://geocode.search.hereapi.com/v1/geocode?q=eiffel+tower&apiKey={{apikey}} is returning the following;
{
"error": "Forbidden",
"error_description": "These credentials do not authorize access"
}
I've confirmed the API key to be functional, as a request to the older API, like so https://geocoder.ls.hereapi.com/search/6.2/geocode.json?searchtext=eiffel+tower&apiKey={{apikey}} does work and returns expected results.
I'd like to use this API specifically, as it will be interfacing with a system that uses this version of the HERE API, and would like to maintain parity.
The documentation states that either API Key or OAuth are acceptable to use, and according to the linked identity & access management guide, this is done by simply adding the apikey query parameter, as seen in the working 6.2 example.
Other questions on the matter state that this code is returned when the endpoint is not usable on a base plan, however the pricing page indicates this should be usable on a free account up to 5000 requests.
You have linked your app_id, which are using is linked to as specific project.Because of this you are not able to use this app_id in the geocode service.
Please make sure that the app is linked to No project in the access manager as shown in the below screen.

Invalied token error in google calendar api

I'm using google calendar api to addd events tocalendar. When I'm using oauth2.0, its asking for oauth and working properly. but after 2 0r 3 try, its failing, it shows invalied token error. And again after some times it work properly.
And if I use the token stored, its asking for oauth2 for the first 1 or 2 attempts and its fine. but its not asking for oauth and no events are being created. agin after some tries its asking for oauth2.
I didn't get any Idea why its happening so. Is there any solution?
This is probably occurring because your tokens are expiring. Include access=offline and prompt=consent in the authorization code link and it will probably start to work. Also make sure to refresh your token of the original access token fails and call the API with the new access token.
I work with Pathfix and it takes off the exact hassle for you if you want to save some time with the OAuth dance :)

Google Analytics - a way to submit query from Query Explorer via API

There is an API in place and available to me (v4 compatible), but for various reasons it's not working correctly and there is not much time to fix it (too many other fires). So the idea was floated that that to bypass most of the issues with API here it might be a quick-fix to send whole query to GA.
It needs to be automated and results stored in our DB (Webservice on MS Stack), else we would do it manually all the way, which is out of the question at this time.
Hence the question:
IS there a way to submit a query that is exactly the product of a Query Explorer via API or any other way and retrieve it's results?
The API Query URI returned by the Query Explorer
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A78110423&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Ametric1
Is for the Google Analytics v3 api. To use this in your own code you must simply attach a valid access token to the end of the request.
https://www.googleapis.com/analytics/v3/data/ga?ids=ga%3A78110423&start-date=30daysAgo&end-date=yesterday&metrics=ga%3Ametric1&access_token=XXXX
This is not going to be using the Google Analytics v4 API that is a different call entirely.
Access tokens can be retrieved from either service account authentication or Oauth2 authentication and must be valid for the view you are requesting data for.

LinkedIn New API - Can't Get r_network Permission

I inherited a program that was written with the old LinkedIn API, and I'm trying to migrate it to the new API. When I try to get the r_basicprofile permission, my oauth token works. However, when I try r_network or rw_nus, I get a response
invalid scope -- your application has not been authorized for
r_network.
Yet, when I go to www.linkedin.com/developer/apps/xxxx/auth, the boxes for r_network and rw_nus are checked.
I.e., A request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_basicprofile&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
works, but a request to
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=xxxxxx&scope=r_network&state=yyyy&redirect_uri=http%3A%2F%2Fkalatublog.com%2Fwp-content%2Fmu-plugins%2Fimb-en%2Fhelpers%2Fsocial-connect%2Fapi%2Ffinalize.php%3Fapi%3Dlinkedin%26ch%zzzzz
gives that error. What am I doing wrong?
As of May 15,
After the grace period expires, several REST API endpoints will no longer be available for general use. The following endpoints are the only ones that will remain available for use:
Profile API — /v1/people/~ `
Share API — /v1/people/~/shares
Companies API — /v1/companies/{id}
If your application is currently using any other API services (e.g. Connections, Groups, People Search, Invitation, Job Search, etc.) you will have to apply to become a member of a relevant Partner Program that provides the necessary API access to continue to leverage any of the endpoints that are not listed above.
It looks like linkedin no longer wants to share anything with their API. Creating a new app indicates that the only possible options are r_basicprofile, r_emailaddress, rw_company_admin, and w_share:
TLDR: they have locked down the API and restricted the usage to an extremely limited set of access points.
I did some more digging. The linkedin website is misleading. On my app linkedin page, it says that I'm approved for rw_nus and r_network, but on this page
https://developer.linkedin.com/support/developer-program-transition
it says those are no longer approved.
So the app home page in linkedin incorrectly said I had those permissions.
Heres the link if you want to Apply for Linkedin
https://help.linkedin.com/app/ask/path/api-dvr

Getting complete educations from LinkedIn API (working partially)

I have two LinkedIn profiles, one "real" and another used for testing.
Using the API console (https://apigee.com/console/linkedin) I tested retrieving "educations", but strangely on the real profile I cant't retrieve anything but an id and start/end dates, while on the test profile I can retrieve all details about education.
I have the necessity to use the REST API and not JS or other methods.
Anyway, is there anything I can check to retrieve all education details about my real profile? Am I missing something?
thank you
I'm guessing you authenticated your API account against your "test" profile.
The /v1/people/~:(....) API will return all the complete data for the account the API was used to authenticate. But for "connections", 1st degree and beyond, the API will only retrieve data as if it were a 3rd degree connection.
Using the API as /v1/people/id=... or /v1/people/url=... results in "3rd degree" type access data.
From the profile-api
Requesting by member token only returns a profile from the logged in person's three degree network and doesn't return any out-of-network profiles. You cannot use a member token to get a public profile.

Resources