Pinterest API - Authorization failed - oauth-2.0

I created an new Pinterest API and used PostMan to get an Access Token. I have not tried to get it approved. When I try to use an API called PinSharp, the pinterest client fails to get the boards and just the an exception message "Authorization failed".
Does anyone know how to get passed this so the app can be used to pin images?

You need to get your app approved by Pinterest prior to being able to pull data from the API. After you complete the application process and are approved, you will see a "Visit API docs" link on your app page that will then provide detailed information on how to access the API.
I'm not sure if there are multiple documentation locations depending on the type of access you are given, but the documentation I have access to is: https://developers.pinterest.com/docs/redoc/pinner_app

Related

Forbidden from deleting managed apps from Intune using MS Graph API

While getting managed apps from Intune using the graph api is no problem, every time I try to delete an app from intune, i get 403 forbidden.
DELETE https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 403
GET https://graph.microsoft.com/beta/deviceAppManagement/{appID} - returns 200
I've tried adding the application in the app registration portal and adding it as a app in the Azure AD.
First I get an auth code using from here
https://login.microsoftonline.com/{TenantID}/oauth2/authorize?response_type=code
&redirect_uri=localhost
&client_id={MyAppID}
&resource={ "https://graph.microsoft.com"}
&prompt=admin_consent
&scope=DeviceManagementApps.ReadWrite.All
And then obtain a jwt token from here, using the code
POST https://login.microsoftonline.com/{TenantID}/oauth2/token
-Body grant_type=authorization_code&redirect_uri={redirectURI}client_id={App/ClientID}&client_secret={App/ClientSecret}&code={MyAuthCode}&resource=https://graph.microsoft.com
I then use the returned token to make calls to the graph api.
I've also tried using the common endpoint, but to no avail.
Am i missing some permission scope I need to set? I have the following delegeted perimissions set for the app and im authenticating using an admin account on a MS demo account.
Read and write Microsoft Intune apps (preview)
Sign in and read user profile
Read and write directory data
If it's a "Managed" app - those are built-in apps that Intune ships, and can't be deleted. Can you verify that it works if you create/delete a standard iOS store app via Graph API?

How to get Youtube video views by date range

I am trying to get youtube video views by date range and it is working fine with oAuth. But I am using cron script to collect those data through service account, when I try to execute the script it says:
Error calling GET https://www.googleapis.com/youtube/analytics/v1/reports?ids=channel%3D%3DUC88Bq63MDJi9szYPEGfv7YA&start-date=2014-02-01&end-date=2016-06-29&metrics=views:
(400) Invalid query. Query did not conform to the expectations".
Could you please help me anyone to resolve this issue. Thanks in advance.
Using service account is not supported by Youtube Analytics and Reporting API
The service account flow supports server-to-server interactions that do not access user information. However, the YouTube Reporting API and YouTube Analytics API do not support this flow. Since there is no way to link a Service Account to a YouTube account, attempts to authorize requests with this flow will generate an error.
Unfortunately, you need to do OAuth2 to get your report.
Resources you can check for information:
Youtube Analytics API PHP Invalid query. Query did not conform to the expectations
Implement OAuth 2.0 Authorization

How to convert LinkedIn API for sharing the content from OAuth 1.2 to OAuth2

I'm working on building an app for our project.
I have to share content in our app to linkedIn account from the app.
Before we used to OAuth1 of linkedIn Developers API and it was working fine., but now it is not working.
I made some changes like changing the permissions from rw_nus to w_share., with this change I'm able to see the login page of the Linkedin in our app., but after successfully adding the account, now I'm unable to share the content on LinkedIn.
I'm getting the following error :
401, Unauthorized error.
The path I'm using for shares is :
http://api.linkedin.com/v1/people/~/shares
What other changes do I need to do to make it work?
Have you updated your registered app at https://developer.linkedin.com/ to work with the new OAuth 2.0?
More information on the new share api can be found here:
https://developer.linkedin.com/docs/share-on-linkedin
FYI: The old Api key is now called "Client Id". Confused me for ages after the upgrade and some of the api docs still reference api key.

"accessNotConfigured" error occurred using Youtube API v3

I have been struggled with Youtube API and now I am stuck.
What I did is:
create a project at google developers console(https://console.developers.google.com)
enabled "YouTube Data API v3"
generate api key of iOS.
access to https://www.googleapis.com/youtube/v3/search?key={API KEY}&part=id&q=soccer by web browser and got the error message
Am I missing something?
I have read many questions but I cannot solved yet.
In step 3 "generate API key for IOS", the comment on the Google Developer Console web page says
Use of this key does not require any user action or consent, does not grant access
to any account information, and is not used for authorization.
Clicking on the *Learn More" button, it says:
Use an API key when your application is running on a server and accessing one of the following kinds of data:
•Data that the data owner has identified as public, such as a public calendar or blog.
•Data that is owned by a Google service such as Google Maps or Google Translate. (Access limitations may apply.)
I think you need to use the OAuth process rather than the API Key. Click on Learn More in the OAuth section of the Developer Console web page to learn about using OAuth with Apple iOS.
To create oAuth credentials for iOS:
Create new Client ID / Installed Application / iOS
I know it sounds a bit elementary, but I solved this same problem by going back into Google developer, creating a whole new project, new API key, and then it worked. Google quirk??

AdWords API, getRefreshToken url not working

I am trying to get the refresh access token from AdWords API but the url generated by GetRefreshToken does not really work despite the fact I am logged in with the user that owns and created the API token.
Any ideas?
For other people who also get stuck in the new oAUTH2 auth. of AdWords, here's the solution.
In the google code console, when you create your project, in the consent screen you must fill in all the fields required for WEB application. This is because the url you hit provided by the php script requires web access permissions and if not provided you get a bunch of weird unrelated errors.
Hope this helps.

Resources