SoundCloud API returns 401 or 403 on some tracks for some client ids - soundcloud

This sound cloud api call returns 401: https://api.soundcloud.com/tracks/21402225/stream?client_id=619ab3605c6ce729b96c341a2f6e6ef5
This sound cloud api call return 403: api.soundcloud.com/resolve?url=https://soundcloud.com/blondesound/feel-good-extended&client_id=619ab3605c6ce729b96c341a2f6e6ef5
Someone said this is due to some permission settings. However, I created a Soundcloud track myself and toggled all permission settings, but I still couldn't reproduce the same error.
I also created another Soundcloud developer account or another Soundcloud app, and tried to access the track above, but I still got the error 401 or 403.
Could someone help me get a successful api call?

Users are able to restrict access to their tracks so that they are not accessible over the api. That is likely what has happened here.

Related

Issue creating app requests on facebook http graph api

When trying to create app requests through facbeook http graph api I'm getting the error "(#2) Failed to create any app request".
As described in the documentation (https://developers.facebook.com/docs/graph-api/reference/user/apprequests/) I'm using the URL https://graph.facebook.com/{userid}/apprequests setting in post the access token, a title and a message. I've tried different combinations of parameters just to check if I needed anything else, but just if I remove access token and/or title I get different errors.
In addition to that, if I use my own userid, instead of other userid (obviously a friend) that I want to send the request to, there's no error at all, but no request is created.
I don't think it may be related with permissions because both users (source and destination of the request) are admin, developer or tester of the app.
Thank you
Just in case anyone needs it, the problem is that user apprequests can only be created if using any facebook ui methods. That's why in this thread Apprequest of Android Facebook sdk 3.0 comment 1 advices to use webdialog instead of sending the request in code.
More on this topic, I've been researching and I found out that I started with my app really long ago (using API lower than 2.3) so I didn't need to set the category as "game" to be able to send apprequests. I updated its category and after multiple tests I've found the following scenarios:
Javascript API works correctly to send requests in my app
Graph API fails to send requests if using user auth token getting the same error as before
Graph API is able to send requests if using app auth token (from app_id + app_secret)
As far as I've read, there's no limitation in using either kind of auth tokens for apprequest calls.
In addition, my app will be running in web, desktop and mobile. The scenario in which I'm using graph API directly is desktop for obvious reasons (there's other APIs tor the other platforms). As recommended in the FB api documentation, the app secret should not be included in binary code deployed to users, so I would need to use the user auth token.
Any help would be apreciated
Thanks

LinkedIn Ads Rest API - I can connect to /v1/people/~ but not the /v2/adAnalyticsV2?

I can connect to the /v1/people/~ API URL perfectly with my Access Token but trying the same Token on the /v2/adAnalyticsV2? gives me a 403 error (without further explanation). I read through all the LinkedIn documentation about their Rest API and I just don't get it.
Please help.
Based on the error code, it looks like you do not have the proper permission to access this endpoint.
Has your application been given access to use LinkedIn's Marketing Analytics API? If not, you can apply for access here: https://business.linkedin.com/marketing-solutions/marketing-partners/become-a-partner
If you already have access, you should check if your application is requesting the required permission when requesting authorization codes. You would do this either by selecting it in the Default Application Permissions section when setting up your application, or by explicitly requesting it through the scope parameter in the authorization step
I got a note from the engineering team that I can't locate now mentioning something about disabling analytics from v2 of the API for some reason. Worth reaching out to your contact at LI, for sure, but most likely it was removed recently.

Facebook Ads Insights API: (#3) Application does not have the capability to make this API call

I am trying to pull Facebook Ads metrics through the Facebook Marketing API. The flow is basically that I wish to pull all the account ids of my company, and then loop over them, retrieving the insights for them individually.
However I have an error which I am not able to solve/comprehend.
When I attempt to make the API call (both in the Graph Explorer and my Alteryx workflow):
GET-> /v2.8/act_<Account_ID>/insights
I get the following error:
"error": {
"message": "(#3) Application does not have the capability to make this API call.",
"type": "OAuthException",
"code": 3,
"fbtrace_id": "BNevVWUExDg"
}
I must admit that I am quite at a loss what is causing this error...and actually also exactly what the issue is...am I lacking the right scope/permissions for my token?
With the same token I am able to correctly call the API to get a list of all adaccounts (GET-> /v2.8/me/adaccounts ).
Anyone have an idea what my issue might be?
You have to make sure that your particular access token has the permissions ads_management or ads_read.
This is from the Marketing API quickstart. https://developers.facebook.com/docs/marketing-apis
There are also rate limits on those API's, but I would expect a different error if that was the case.
I ran a POST instead of GET on the same endpoints, which gives me another error about not being admin on the account.
It appears that the user associated with the token (which is a long lived one) was only having analyst access to the account in Business Manager. After I changed it to advertiser it seems I can do the GET call.
In my case, I added a new development user in the roles page. Then I was trying to do OAuth. I got the error message "Application does not have the capability to make this API call."
Here's the way that I solve the problem while your application still in the development mode.
Go to Marketing API > Tools
Then select what token permissions you want. Press "Get Token" button.
Now, you can try to do OAuth again.

Facebook Graph API - My access token fails for 1% of public Event requests?

I'm using my FACEBOOK_APP_ID|FACEBOOK_APP_SECRET access token to get events data from facebook.
It works for 99% of events :)
But, it fails on 1%, even though they are public events
I cannot spot any difference between the events that fail and those that succeed.
when trying in the FB Graph Explorer, these requests work fine with the default access token, but do not work with my access token.
the same events work/dont-work with my token in the Graph Explorer as in my php code.
I've tried creating a new facebook application with new access token and the same behaviour occurs.
This event, like almost all, works with my token:
https://www.facebook.com/events/1358567590825431/
This event doesn't work:
https://www.facebook.com/events/481398338716859/
Graph returned an error: Unsupported get request. Object with ID
'481398338716859' does not exist, cannot be loaded due to missing
permissions, or does not support this operation. Please read the Graph
API documentation at
https://developers.facebook.com/docs/graph-api
Does anyone have any idea what's going on here? Is this a bug with facebook or am I doing something wrong?

Facebook access token graph API call result in a bad request error

We have a Canvas Facebook App and for some time we get a strange error for some of the users that are trying to install (allow) our Facebook app. I mention this is happening only for some of the users and not for all! The error we are getting is "The remote server returned an error: (400) Bad Request." The graph API call we putted in a try catch block and this is what the logs says when I searched over them to see what went wrong. The graph API call is:
https://graph.facebook.com/oauth/access_token?client_id=XXX&redirect_uri=XXX&client_secret=XXX&code=code_received_from_facebook.
We received the code from Facebook and append it to the graph API call from above but it seems that for some users this is not working. Our redirect_uri parameters contains an URL to our Facebook App and contains also some parameters (example: http://apps.facebook.com/our_application_URL?cid=xxx&surveyid=xxx&messageid=xxx).
xxx = some values.
Did some of you confront with this kind of strange behavior? Working for some users but for other is not working? We are using the same code so nothing change between a successful installation and a unsuccessful installation.
Thank you for your help in advance!
Now that Facebook require SSL for applications your "redirect_uri" need to be https (i.e https://apps.facebook.com/myapp/), otherwhise you will get "Bad Request".
You probably got the error for only the users that had forced SSL but not the rest.