here-api upgrade map tiles v2.1 to raster tiles v3 giving credentials error - raster

i'm updating our html5 website which is currently using maptiles v2.1 which is being discontinued.
we have updated geocoding, reverse geocoding, routing api calls all fine to the latest version using apikey instead of app_id and app_code.
the old url uses app_id and app_code in this format.
https://1.base.maps.api.here.com/maptile/2.1/maptile/newest/normal.day/18/130111/83381/256/png8?app_id=xxx&app_code=xxx
i've been trying to replace this with the raster tiles url in this format with the new apikey we have, ie:
https://maps.hereapi.com/v3/base/mc/7/66/42/png8?apikey=xxx
this is returning a 403 forbidden error: {"error":"Forbidden","error_description":"These credentials do not authorize access"}
the apikey works fine for the other api calls (geocode, routing, etc) but not this.
does our apikey not have access to the raster tiles api?

Thanks for choosing HERE, the raster tile V3 is not officially launched yet. We will update the info here once available: https://developer.here.com/documentation

Related

Different routing result with Javascript calculateRoute vs iOS calculateRoute

There is a difference between the result of the Javascript API 'calculateRoute' function call from H.service.Platform.getRoutingService(null,8) (Javascript API version 3.1)
And the result of the iOS SDK 'calculateRoute' function from NMACoreRouter. (Premium sdk v 3.1.9)
If I pass in the options
routingType: fastest
transportMode: truck
And I pass in exactly the same set of waypoints.
E.g.
Stopover: -34.909797,138.5403
via: -34.85191,138.49499
via: -34.851,138.49494
via: -34.84965,138.49478
via: -34.84868,138.4947
via: -34.84765,138.49459
via: -34.84681,138.49448
via: -34.84654,138.49439
via: -34.84556,138.49392
via: -34.84252,138.49306
via: -34.84131,138.49272
Stopover: -34.827869,138.500708
Then the via waypoint that is on a bridge will make the javascript route drive down side roads to pass over the bridge. However the iOS API will continue to drive under the bridge.
Is there a way to make the two engines calculate identically?
Javascript:
iOS:
Both engines uses different routing APIs. So it is not possible to get identical results. The Premium sdk v 3.1.9 works on Routing V7 ,whereas the the javascripts works on routing v8.
https://developer.here.com/documentation/routing-api/dev_guide/index.html

does "app_key" means the same as "app_code" for HERE geocoding credentials on Python?

I am trying to geocode some addresses with python
so I created a freemium account on https://developer.here.com
my code is this
(...)
here = Here(here_config.app_id, here_config.app_code, timeout=5)
here.geocode(string_to_geocode)
I am getting the following error message:
HTTP Error 401: Unauthorized
my doubt comes from the difference between the terms "app_code" on my code sample and "app_key" on my credential screen.
Is there another step I need to do in order to get a "app_code" or is my "app_key" already supposed to be it?
P.S. on that same screen Here provides me an option of getting JAVASCRIPT keys, HERE SDK FOR IOS (PREMIUM EDITION) [this option cleary has a button that says "generate app_key and app_code", however, I am not developing a cellphone app, but a python program.
What am I missing ?
here_credential_screen
App ID and App Code have been replaced. We encourage all users to switch to API Key or OAuth 2.0 (JSON Web Tokens) authentication. Please be aware that as part of adapting to the new authentication method, some endpoints have also changed.
please check the new domains here
You can either use your ApiKey or App_Id/App_Code.
for example like this-
https://geocoder.ls.hereapi.com/6.2/geocode.json?apiKey={YOUR_API_KEY}&searchtext=425+W+Randolph+Chicago
https://developer.here.com/documentation/geocoder/dev_guide/topics/quick-start-geocode.html

Getting server error on firebase dynamic link CreateManagedShortLinkRequest with the Ruby client

I am trying to create a dynamic link using the Ruby SDK. I believe I have everything right, but I'm getting a
Google::Apis::ServerError: Server error
When creating the URL
Could you help me figure out what I'm missing/doing wrong or if this is a Google issue ?
Assuming I have generates Oauth credentials requesting the appropriate scopes, I am doing
request = ::Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkRequest.new(
dynamic_link_info: ::Google::Apis::FirebasedynamiclinksV1::DynamicLinkInfo.new(
domain_uri_prefix: Rails.application.secrets.firebase_dynamic_link_prefix,
link: campaign.linkedin_url,
),
suffix: ::Google::Apis::FirebasedynamiclinksV1::Suffix.new(
option: 'SHORT',
),
# name: "Linkedin acquisition URL of #{camp.utm_campaign_name} for #{camp.contractor.name} <#{camp.contractor.email}>",
name: "Test of generation",
)
# => <Google::Apis::FirebasedynamiclinksV1::CreateManagedShortLinkRequest:0x000021618baa88
# #dynamic_link_info=#<Google::Apis::FirebasedynamiclinksV1::DynamicLinkInfo:0x000021618bad80
# #domain_uri_prefix="https://example.page.link",
# #link="https://www.example.com/?invitation_code=example&signup=example&utm_campaign=example&utm_medium=example&utm_source=example">,
# #name="Test of generation",
# #suffix=#<Google::Apis::FirebasedynamiclinksV1::Suffix:0x000021618babf0
# #option="SHORT">
# >
link_service.create_managed_short_link(request)
def link_service
#link_service ||= begin
svc = ::Google::Apis::FirebasedynamiclinksV1::FirebaseDynamicLinksService.new
svc.authorization = oauth_service.credentials
svc
end
end
I know OAuth scopes seem to be working as previously I was getting
Google::Apis::ClientError: forbidden: Request had insufficient authentication scopes.
But I fixed it after increasing OAuth scopes to cover firebase. Also, my request seems correct, as when I try to omit one of the parameters (like the name) I'm getting appropriate validation errors like
Google::Apis::ClientError: badRequest: Created Managed Dynamic Link must have a name
My only clue, is that the create_managed_short_link actually takes more parameters. In the example given above, I also have substituted our real firebase prefix by example but I do own the real firebase prefix I am using, and link generation directly from the Firebase frontend console actually works.
I've updates my google sdk to the most recent version up to date
- google-api-client-0.30.3
Unfortunately generating managed short links through the REST API is not currently supported.
As stated here by someone who works(ed) in the dynamic links team itself.
For now we can only use CreateShortDynamicLinkRequest, however this endpoint does not allow to specify a custom_suffix (i.e. https://example.com/my-custom-suffix)

Unable to get companies for LinkedIn API version V2

I use the Zoonman LinkedIn API PHP SDK to get information about companies an authenticated user is an admin of, using this bit of code:
$profileCompany = $client->get(
'companies',
['is-company-admin' => "true"]
);
This worked perfectly with API version V1. However, with V2, it gives a 400 not found error. I came across this: Organization Lookup API but not exactly sure if this is the right endpoint, as there is no API call to exactly do what the above code snippet does.
Could someone please help with the right endpoint?
If you have the access token from the user this is possible in v2 of the LinkedIn API. See:
https://developer.linkedin.com/docs/guide/v2/organizations/organization-lookup-api#acls
The full URL for the basic request would be:
https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*)))
With paging:
https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*)))&start=[...]&count=[...]
And you probably want the organization logo urls as well:
https://api.linkedin.com/v2/organizationalEntityAcls?q=roleAssignee&role=ADMINISTRATOR&state=APPROVED&projection=(*,elements*(*,organizationalTarget~(*,logoV2(original~:playableStreams,cropped~:playableStreams,cropInfo))))&start=[...]&count=[...]
For linkedin-api-php-client see also:
https://github.com/zoonman/linkedin-api-php-client/issues/31
From the docs
Please note the following changes when migrating your app from v1 of
the LinkedIn API Platform:
Company Pages and Showcase Pages are now
surfaced as Organization and Brand resources, respectively. Both
resources are considered "Organizational Entities," and share common
fields and similarities in how data is accessed.
URNs uniquely
identify organizational entities, and can be generated with existing
company or showcase ids:
Organization: urn:li:organization:{company id}
The above code make call the rest api "List all companies that the member is an administrator of". It does not seems have a direct equivalent API available in v2.
Organisation lookup/search APIs seems nearest alternative.
Hope this helps.

Bing Translator DNS address could not be found.datamarket.accesscontrol.windows.net

We are using the bing translater api in one of our projects for performing translations. The end point we use to call the api is:
http://api.microsofttranslator.com/v2/Http.svc/Translate?text=
To be able to call the API one has to authorize using the https://datamarket.accesscontrol.windows.net/v2/OAuth2-13.
Sometime in the last few days this datamarket.accesscontrol.windows.net url has become unavailable because the domain name resolution fails.
Exception: System.Net.WebException
Message: The remote name could not be resolved: 'datamarket.accesscontrol.windows.net'
Is anyone else affected by this and know what is going on?
The datamarket domain, and the ability to sign up via the Azure datamarket has been replaced by a regular Azure service.
Visit https://portal.azure.com and sign up for the Microsoft Translator Text API to get an API key. More detailed instructions at http://aka.ms/translatorgettingstarted.

Resources