How to execute Here Fuel API using api key? - here-api

I am trying to execute the fuel API, but it is not working and throwing unauthorized error. I am using app code & api key in my request. Is this not supported?
curl -v -X GET https://fuel-v2.cc.api.here.com/fuel/fueltypes.json?app_id={APP_ID}&app_key={API_KEY}

The Fuel Prices API is for in-vehicle applications only and not part of the Freemium plan. (Note that it uses app_id/app_code instead of the apiKey authentication used for Freemium APIs.) You can use the contact us form to request access if you have a relevant use case.

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.

Google Calendar API + Service Account + PHP cURL

all. I have a situation where I need to pull dates for events from a specific calendar from google. Since this is my calendar I don't need anything from anyone. I have created a service account but got stuck how to get authenticated with it using PHP cURl, would appreciate any help!
At the moment I have:
service account (owner)
json file with keys
calendar shared with this acc
calendar id
*I don't see a point to install full google PHP API library for just this task
Google API support OAuth2 authentication. You can use curl with --oauth2-bearer and the token you'll get from your service account on its account page (you have to go to the API console of the account, check the links below).
For PHP cURL, it's the CURLOPT_XOAUTH2_BEARER option, require cURL 7.33 at least. You have to set this with curl_setopt.
Here's the Google modus operandi for the account and the assitant for that.

Bargain Finder Max

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

Development and Testing - Organizations APIs - LinkedIn API

LinkedIn provides 2 public organization API for development purpose:
link
But when I try to access these organization using:
link
It is showing following API fail message:
{"serviceErrorCode":100,"message":"Not enough permissions to access: GET-organization /organizationPageStatistics","status":403}
Is there any problem with my current flow?
From the docs here: https://learn.microsoft.com/en-us/linkedin/marketing/integrations/community-management/organizations/page-statistics#parameters it looks like the organization id is formatted differently
https://api.linkedin.com/v2/organizationPageStatistics?q=organization&organization=urn:li:organization:6177438
Edit: Also, auth tokens are not spec'd to be used as query parameters. You're meant to follow these steps: https://learn.microsoft.com/en-us/linkedin/shared/authentication/authorization-code-flow?context=linkedin/marketing/context and then use the token in the request header.

Cognitive Services API 401 on authorization

I'm trying to use the Cognitive Services API (Text Translator), I've got an Azure subscription and have obtained a subscription id.
Using the examples from MS I pass the subscription id through to https://api.cognitive.microsoft.com/sts/v1.0/issueToken using a POST. The response is a 401.
I've checked the subscription id, tried the interactive page but it all returns the same, I've only just setup the subscription so it shouldn't be invalid.
Any ideas on what I've done wrong?
Found out what was wrong, I mistakenly used the subscription id from the Azure API that I'd setup, I actually needed to use the Key from the 'Keys' option in 'Resource Management'.

Resources