Cognitive Services API 401 on authorization - microsoft-cognitive

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'.

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.

TeamDrive Notification Using Google admin SDK for reports having issue with owner_is_team_drive flag

I'm using the documentation https://developers.google.com/admin-sdk/reports/v1/guides/push#making-watch-requests for creating the channel for team drive for google using google reports API. According to the document, we can make channel depending upon various filter conditions. For my purpose, I choose to use the filter "owner_is_team_drive==true". The problem with using this filter is that a channel gets created properly (I get a channel object in return) but the notification doesn't come if I perform any action.
I'm using Google Admin SDK for reports for creating the request for the channel. While looking at the logs I found that the API being used to hit the request is https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive?filters=owner_is_team_drive%3D%3Dtrue
PS: I tried using other filters(like "doc_type==team_drive") and also the API without filters, I get the notification properly.

TeamDrive Notification Using Google admin SDK for reports

I'm using the documentation https://developers.google.com/admin-sdk/reports/v1/guides/push#making-watch-requests for creating the channel for team drive for google using google reports API. According to the document, we can make channel depending upon various filter conditions. For my purpose, I choose to use the filter "owner_is_team_drive==true". The problem with using this filter is that a channel gets created properly (I get a channel object in return) but the notification doesn't come if I perform any action.
I'm using Google Admin SDK for reports for creating the request for the channel. While looking at the logs I found that the API being used to hit the request is https://www.googleapis.com/admin/reports/v1/activity/users/all/applications/drive?filters=owner_is_team_drive%3D%3Dtrue
PS: I tried using other filters(like "doc_type==team_drive") and also the API without filters, I get the notification properly.

FareNabber API on Sabre - where do the notifications go

I am interested in seeing if Sabre's FareNabber is an API that works for an application I am building.
The documentation here https://developer.sabre.com/docs/read/rest_apis/air/search/fare_nabber does not explain where/how the notifications get posted to after a subscription made. All I see is the following:
FareNabber nabs the itinerary options and pushes the results to the customer for a purchase decision.
Is this an email to the customer? Is this an HTTP POST with a JSON payload to a server I provide so I can handle the actual email transmission? Where is this documented?
Re Endpoint you set this up during activation:
Note: This service requires activation, please contact your Sabre Account Representative for assistance.
Actually yes you get a JSON - its specified here: http://files.developer.sabre.com/doc/providerdoc/STPS/fare_nabber/v100/FNB_LowFareNotification.json

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

Resources