Client error response [status code] 403 [reason phrase] Forbidden - api

When I call linked in api method "v1/companies/{id}?format=json", I get error like "Client error response [status code] 403 [reason phrase] Forbidden". Application is authorized as group admin and it has permission: rw_company_admin. What I doing wrong?

Earlier this year, LinkedIn's API changed in several ways (detailed here: https://developer.linkedin.com/blog/posts/2015/todays-changes)
One of those changes is that you need to be an official LinkedIn company administrator to make companies API calls now, so what's likely happening to you is that the company {id} value you are submitting is one that the authenticated member is not an admin of, and as a result, the call is forbidden.
You can make the following API request to test if the current user is an admin for a given company so that you know the subsequent request will work:
https://api.linkedin.com/v1/companies/{id}/relation-to-viewer/is-company-share-enabled?format=json
Additionally, you can get a list of all the companies that a member is the admin of with this call:
https://api.linkedin.com/v1/companies?format=json&is-company-admin=true
Complete documentation is available here: https://developer.linkedin.com/docs/company-pages

Related

Linked API for get Company Post

I have tried to use the API for linkedin company posts.
https://api.linkedin.com/v2/activityFeeds?q=networkShares&count=2&oauth2_access_token={mytoken}
But i am getting this error.
{"serviceErrorCode":100,"message":"Not enough permissions to access: GET-networkShares /activityFeeds","status":403}
I guess i need some extra permission to get response. I have the "client id" and "secret id". So can i get the company posts by any other API ?
If you are attempting to use application authorization via OAuth 2 then you will need to generate an access token along with your client ID & secret. This can then be attempted to the request via Basic authorization.
This article should explain that in more detail

Discord: 403 Forbidden (error code: 50001)

I tried to get a list of users through the API, but in response I got:
Missing Access 403 Forbidden (error code: 50001)
Request: https://discord.com/api/v9/guilds/{guild.id}/members;
And I was thrown out of my account, asking to verify my account.
At the same time, I accessed the server from the account that owns the server ...
MB is the fact that this is not a bot, but a live account?
Answer from comment:
Yes, using HTTP requests with user Discord accounts (user-botting) is
against Discord TOS and they can eventually terminate your account.
Create and use a bot account instead.

Getting error "email already in use" while requesting for authorization code in sageone API

I am trying to get access token for granting my sageone api request but before that I need to get the authorization code. But when I am trying to get one I got an error on my callback url that "email is already in use"
here is the request url
`https://www.sageone.com/oauth2/auth/central?filter=apiv3.1&client_id={{MY_CLIENT_ID}}&response_type=code&redirect_uri=http://localhost:85/test.php&scope=full_access&state=1234`
After visit above link I prompted to login to my sage account when I logged in then I redirected to the callback url which I provided in the above request and got below errors in parameters
http://localhost:85/test.php?error=Invalid+request&reason=Email+already+in+use&state=1234
any can body can suggest anything here
Email already in use usually happens in a situation, where you have logged into the Sage One/Accounting application in the browser for a different country in the past. There is a valid cookie for the user, but the application looks for the user in the wrong country.
Use this URL to reset the cookie: https://www.sageone.com/?clear. Call it before you go to https://www.sageone.com/oauth2/auth/central and this should be fixed.
Note: for more documentation about this behaviour, check out the FAQs: https://developer.sage.com/api/accounting/guides/faq/.

Linkedin API 403 error

I want to use the Linkedin API to get the company update feeds. I created the app and gave it full permissions. But I got a 403 error
Member does not have permission to get company.
Can anyone help?

Gmail label request fails with http 403 (forbidden)

I have an application that uses OAuth 2 to access Gmail. This is working fine for most users. For some users, however, my application fails at the point of trying to read the Gmail labels, with http error 403 (forbidden). Keep in mind that previous to this API call, I have accessed the user profile successfully. Here is the call that fails:
GET /gmail/v1/users/user.name#domain.com/labels?access_token=ya29.fwI_zL1rF3xOIQcHNzpBhmjVlJhRpofkh4a9mVvwhYRo6H09qX5RNKv76zKT7e6-sEZr
I am requesting the following scopes when getting the access token, and the user has logged in to Google and accepted the request for access (and I can see this when we look at his security dashboard):
https://www.googleapis.com/auth/calendar
https://www.googleapis.com/auth/userinfo.profile
https://www.google.com/m8/feeds
https://www.googleapis.com/auth/tasks
https://www.googleapis.com/auth/gmail.labels
https://mail.google.com/
Note that I just added the gmail.labels scope in at attempt to fix this.
Again, this code is working fine for most users - why do some users fail the label request?
Use the shorthand value me instead of user.name#domain.com and the user who the access token belongs to will be used automatically.