Sharing articles on Linkedin - linkedin-api

I'm trying to make a simple link for sharing articles on Linkedin. For example:
Linkedin
But I'm getting an error:
And in the console:
6oydvamu0ccyz6bjubzwr4zq1:2291 Error while processing route: inshare.index Ember Data Request GET /voyager/api/contentcreation/urlPreview [inshare-common/routes/index] Error: Ember Data Request GET /voyager/api/contentcreation/urlPreview [inshare-common/routes/index]
at https://static-exp1.licdn.com/sc/h/dw3m6924dec632qi6ure12fs0:189:561
at b (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:7246:12)
at g (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:7245:3)
at p (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:7232:1)
at invokeWithOnError (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:6116:199)
at d.flush (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:6100:20)
at p.flush (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:6128:52)
at B._end (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:6229:9)
at B._boundAutorunEnd (https://static-exp1.licdn.com/sc/h/6oydvamu0ccyz6bjubzwr4zq1:6166:6)
I get the same result in a dev environment, so it's not because of localhost
What do I have to do to make it work as it should?

Related

Verifiable Credential - Presentation request gives an Internal Server Error

Microsoft Entra, a new Home of Microsoft Verifiable Credential is really new and nice feature. While I am playing around the items, I found an issue which I am not sure is an issue from my code rather Its more from the platform.
To give you little detail:
Company A: I have one Microsoft Verifiable Account to create the credentials for Company A employee.
Company B: I have one Microsoft Verifiable Account to verify (who likes to give a discount to those employees who are from Company A).
Step 1: using Company A, I have created the Verifiable Credential and It is stored in my Microsoft Authenticator App successfully.
Step 2: Coming to the next part of the story, Company B generates the presentation request where It likes to verify Company A employees' identity. I am able to create that presentation request and QR code for that as well.
Issue comes: Now, when I scan that presentation QR code using the authenticator app, It finds my stored crednetial is matching with this request. so, It gives me an option to share that credential against this presentation reuqest which is good and correct. But the moment I press "Share" it wait for a second and gives me an error message.
The error message is user friendly: Oops, failed to connect.
It seems there is a problem with one of our services connecting to your device. Check your network connection and try again.
But in technical detail, It says:
Error Code: internalServerError
Error Details: A generic error has occurred on the server.; Not Found; Not Found
TimeStamp: Dec1, 2022 10:02:48 AM EST
Request ID: 438395be97f20bbcc31511351121bbaa
Correlation ID: 3sg46/0ARha0zS/XHYKGfA.6.4
It also gives an option to see the track which is way long and can not be copy in mobile clipboard. But I took a part of that and that is below:
2022-11-30 17:49:33,560 INFO/Broker: [com.microsoft.identity.common.internal.result.MsalBrokerResultAdapter:authenticationResultFromBundle][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Broker Result returned from Bundle, constructing authentication result ThreadPoolExecutor$Worker.run()#641 [pool-14-thread-1]
2022-11-30 17:49:33,562 INFO/App: MSAL acquire token silently success: com.microsoft.identity.client.AuthenticationResult#5709e74 MsalTokenRefreshManager$getTokenSilentlyAsync$4$1$onTaskCompleted$acquireTokenSilentParameters$1.onSuccess()#567 [main]
2022-11-30 17:49:33,563 INFO/Broker: [com.microsoft.identity.common.java.result.LocalAuthenticationResult][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Id Token type: IdToken ThreadPoolExecutor$Worker.run()#641 [pool-14-thread-1]
2022-11-30 17:49:33,563 INFO/Broker: [com.microsoft.identity.common.java.result.LocalAuthenticationResult][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Constructing LocalAuthentication result, AccessTokenRecord null: false, AccountRecord null: false, RefreshTokenRecord null or empty: false, IdTokenRecord null: false ThreadPoolExecutor$Worker.run()#641 [pool-14-thread-1]
2022-11-30 17:49:33,564 INFO/App: Token result: Success AadRemoteNgcAuthCheckUseCase$checkForAuth$2.invokeSuspend()#88 [DefaultDispatcher-worker-5]
2022-11-30 17:49:33,564 INFO/Broker: [CommandDispatcher:submitSilent][2022-11-30 17:49:33 - thread_name: pool-27-thread-2, correlation_id: b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b - Android 30] Completed silent request as owner for correlation id : **b27725eb-c6fc-4a0f-bdd5-dd5f3f74270b, with the status : COMPLETED is cacheable : true ThreadPoolExecutor$Worker.run()#641 [pool-14-thread-1]
2022-11-30 17:49:33,564 INFO/App: ListSessionsUseCase request with client request ID: 09871643-7561-4d9a-8e43-567c4d0480cb RemoteAuthenticationManager.listSessions()#201 [DefaultDispatcher-worker-5]
Just to troubleshoot:
I have tried to restart my phone.
Connected with wi-fi and data card.
I tried to check the previous Company A issuer Credential flow is still working and giving me the credential and all are working.
So, it is not an issue from my device and neither is the issue with authenticator connectivity issue from my side.
I think your implementation is based on the following Azure sample.
If so, please comment out the line on VerifierController.cs file under PresentationCallback() method which has a statement like //payload = presentationResponse["issuers"].ToString(). The data in the incoming request payload doesn't have "issuers". Instead of commenting out, you can also use the following:
payload = presentationResponse["verifiedCredentialsData"][0]["issuer"];

Microfocus ALM OCTANE REST API - Get existing manual test's step details

I am trying to get existing manual test steps from ALM using the below REST API
https://almoctane-apj.saas.microfocus.com/api/shared_spaces/shared_space_id/workspaces/workspace_id/tests/manual_test_id/script
but I get the following result.
{
"creation_time": "2020-01-16T14:36:52Z",
"test_version": "{\"id\":1035,\"type\":\"test_version\"}",
"version_stamp": 5,
"last_modified": "2020-01-17T09:38:20Z",
"script": "- Open Browser\n- Type Username\n- Type PAssword\n- Submit\n- #2012 Call <ReqTest1>\n- Login using <Username> and <Password>\n- ?isLoginSuccesfull"
}
Is there a way to get existing manual test steps with details(like id, description, etc) through REST API?
i know that is six month late , but you could try calling entity test
http://URLdirection:PORT/api/shared_spaces//workspaces//tests?fields=id,latest_version&query=%22(id%3D%27yourTestId%27)%22
and once you have latest version you can call entity test_versions with attribute last_version that you got in the last request
http://URLdirection:PORT/api/shared_spaces//workspaces//test_versions?fields=id,script&query=%22(id%3D%27yourVersionID%27)%22
and there you will get the steps , also you have to consider that before doing this you need to have stablished connection (requested cookies, etc...) for avoiding 403 error and properly setted headers and parameters for the request. and if you're using microfocus library i didn't find any direct call for test_versions entity
EDIT: also you can request to http://URLdirection:PORT/api/shared_spaces//workspaces//test//script

Can't retrieve crawling errors using Python client

A while ago (around 3 months) I used gsc api to retrieve crawl errors, but it does not work right now. Here is the code:
# oauth2flow <--- function implementing authorization
service = oauth2flow(name='webmasters', fname='path_to_client_secret', scope='https://www.googleapis.com/auth/webmasters', version='v3')
self.service.urlcrawlerrorssamples().list(
siteUrl=siteUrl,
category=category,
platform=platform
).execute()
The problem is that urlcrawlerrorsamples is not recognized (AttributeError: 'Resource' object has no attribute 'urlcrawlerrorssamples'). All other things like seachanalytics, sites work just fine. I have problem only with crawling errors.
Here is my package list:
google-api-core==1.11.1
google-api-python-client==1.7.9
google-auth==1.6.3
google-auth-httplib2==0.0.3
google-auth-oauthlib==0.2.0
google-cloud-core==1.0.1
google-cloud-storage==1.16.1
google-resumable-media==0.3.2

Get data of a post using ID provided by facebook realtime-api

I am using Facebook realtime api, as I get only the updates and have to fetch the whole data by hitting the server again.
I have a page, my app added to that hence I am getting page feed(like, comment, post, all).
When any user posts on the page, we get the update from Facebook realtime update api. But when I try to fetch post data using the Koala gem it gives me error, note that error is not in case of Update from Page itself(page admin) but when some other user posts on it.
Following is the code for help :-
Trying to fetch using long lived page-token, and without that too, failing both ways
##graph = Koala::Facebook::API.new ACCESS_TOKENS["facebook"]["page_token"]
##public_graph = Koala::Facebook::API.new
JSON response from facebook :-
{"object"=>"page",
"entry"=>
[{"id"=>"123412341234234",
"time"=>1412341234,
"changes"=>
[{"field"=>"feed",
"value"=>
{"item"=>"post",
"verb"=>"add",
"post_id"=>123412341234123,
"sender_id"=>1234123412}}]}]}}
##public_graph.get_object("123412341234123")
*** Koala::Facebook::ClientError Exception: type: GraphMethodException, code: 100, message: Unsupported get request. [HTTP 400]
##graph.get_object("123412341234123")
*** Koala::Facebook::ClientError Exception: type: GraphMethodException, code: 100, message: Unsupported get request. [HTTP 400]
Please help me out to understand how to fetch the public post data using the post_id provided by the realtime-updates api of facebook.
Q: how to fetch the public post data using the post_id provided by the realtime-updates api of facebook.
For fetching public data of the post from the page, you will need to specify both the IDs (page id as well as post id) you are getting in the RT hit form fb.
You will need to pass id as <page_id>_<post_id>. In your case, it will be:
rt_hit = {"object"=>"page",
"entry"=>
[{"id"=>"123412341234234",
"time"=>1412341234,
"changes"=>
[{"field"=>"feed",
"value"=>
{"item"=>"post",
"verb"=>"add",
"post_id"=>123412341234123,
"sender_id"=>1234123412}}]}]}}
entry = rt_hit["entry"].first // you may want to have loop instead of `first`
public_id = "#{entry['id']}_#{entry['changes'].first['value']['post_id']}"
##public_graph.get_object(public_id) // fetch object

Unable to get past login page using jsoup

I am unable to get the desired response using jsoup to login and scrape the referred page.
I am trying to access a page called https://localhost/private/frontpage.do , and I can see that the POST method is POST security_check which I gleaned via firebug with the parameters password=guest&username=guest&submit=.
When I use the following code I still am unable to get to the desired page.
Response res = Jsoup
.connect("https://localhost/private/security_check")
.data("j_username", "guest")
.data("j_password", "guest")
.referrer("https://localhost/private/frontpage.do")
.data("submit", "")
.method(Method.POST)
.execute();
Document doc = res.parse();
String sessionId = res.cookie("SESSIONID");
Document doc2 = Jsoup.connect("https://localhost/private/frontpage.do")
.cookie("SESSIONID", sessionId)
.get();
I received the following POST location and parameters from firebug as follows https://localhost/private/j_security_check?password=guest&username=guest&submit=
Any idea why I cant see the new page, but get a HTTP error instead in Java Exception in thread "main" org.jsoup.HttpStatusException: HTTP error fetching URL. Status=408