How is next cursor in this Instagram json response encoded - graphql

When appending ?__a=1 to a page on Instagram it is possible to view the JSON, as in this link:
https://www.instagram.com/explore/tags/malta/?__a=1.
This response contains an end_cursor field that references the last object in the response. The format of this field is: "J0HWJ-mOAAAAF0HWJ-hGgAAAFiYA.
Does anyone have a clue on how I can find out what information was encoded inside the string?

Related

how to send email attachments using power automate to webapi

I am new to power automate. I need to read my email attachments and send each attachment to webapi as base64. I used below expression to convert email attachment to base64. but flow shows error as "Correct to include a valid reference to 'Get_Attachment_(V3)' for the input parameter(s) of action 'HTTP'.
what should be correct expression to convert attachment to base64.
expression: base64(body('Get_Attachment_(V3)')?['contentBytes'])
error:
A couple of things.
Firstly, in your JSON body, you just need to put quotes around the value of the content property.
Secondly, make sure you have a Get Attachment (V#) step prior to the HTTP action.
This step actually retrieves the contents of the attachment.

Why does twitter API add url at the end of the text

When getting tweet information using the twitter API, the returned text or full_text field has a URL appended at the end of the text. For example:
"full_text": "Just another Extended Tweet with more than 140 characters, generated as a documentation example, showing that [\"truncated\": true] and the presence of an \"extended_tweet\" object with complete text and \"entities\" #documentation #parsingJSON #GeoTagged https://twitter.com/FloodSocial/status/994633657141813248"
https://twitter.com/FloodSocial/status/994633657141813248 is appended at the end(The appended url is acutally a shortened url but stackoverflow does not allow shortened url in the body so I just replace it with the full URL). Why does the API add this and is there a way to get the text without the added URL?
Are you using the correct twitter gem? using gem install twitter and setting up a client according to the docs, you should be able to just get the tweet/status by it's ID. But whatever example you are using doesn't show how you got the full text
text = client.status('994633657141813248').text
=>"Just another Extended Tweet with more than 140 characters, generated as a documentation example, showing that https://twitter.com/FloodSocial/status/994633657141813248"
The url is truncated as a plain string so not sure what you even do to get the string you formulated.
But if you have some long string somehow with the url embedded, you could do
text.split(/\shttp?s/).first
That looks like a quote Tweet where the original Tweet URL is included?
[edit - I was wrong with the above statement]
I see what is happening. The original Tweet links to an image on Twitter (https://twitter.com/FloodSocial/status/994633657141813248/photo/1, via a shortened tco link). Twitter hides the image URL in the rendered Tweet, but returns it in the body of the text. That's the expected behaviour in this case. You can also see the link parsed out in the extended_entities segment of the Tweet data, as well as the image data itself in the same area of the Tweet. If you want to omit the URL from the text data, you'll need to trim it yourself.

post data with value showing valid response data but same value from regular expression is not showing valid response data in jmeter

When manually entering value in below parameters, it's working fine and showing a valid response.
Below post shows data when values are manually entered:
POST https://qatbagp523.unix.gsm1900.org/wcs/resources/store/11151/quoteHandler/syncQuote
POST data:
{
"opportunityId":"92456",
"quoteNumber":"54044"
}
[no cookies]
But same value captured from regular expression will not show valid response data
Below post data values captured from regular expression
POST https://qatbagp523.unix.gsm1900.org/wcs/resources/store/11151/quoteHandler/syncQuote
POST data:
{
"opportunityId":"92456",
"quoteNumber":"54044"
}
[no cookies]
Even same post data values but manually entered post data is showing valid response but regular expression captured post data is not showing valid response
I observed headers and other valuesm there is no change, could any please resolve how to get response and what could be the cause for this type of issues
Given you send the same requests you should be getting the same responses, if you have different responses - most probably you're sending different requests
Compare 2 requests using View Results Tree listener, they should be exactly the same in terms of request body, request headers, etc.
Check the variable which is stored by the Regular Expression Extractor using Debug Sampler, it might the case there are extra spaces, line breaks, etc.
Use a third-party external sniffer tool like Wireshark or Fiddler as View Results Tree listener doesn't always tell the full story
If you won't be able to figure out the root cause of the issue - consider saving all the request and response data for both Samplers and update your question with the XML file containing these details.

Url encoding using Jmeter

I am getting the response,and i want to send this value encode and next request,in UI i tried check encoded,looks still not working fine,is there any other way we can encode the response value.
In the screenshot in getrooms response i will get rate_id in decoded,so this value i have to encode and send in next request,please help
The response rate_id encoded value have to send in next call price check as a param.
Encode rate_id value.
"rate_id":"U2FsdGVkX1+HjyYgKhRqQqZFG9RHN5oSSimGi8j1F1rDjaogIxs5kqTWhVlKCYVnM9f2eqzcBik/OxGAlWeWW3ZqZ7Tya9fOR2BjFaoIWYaGhsrDEwrOckKq615FDUwz0jdvxoB0kgFIw7GPlfdNiyRQuBsH9mtCuXn6lKR4C6wV7OBsNCEQ8WeeriqmgFE429OVZGnqQ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2AvnJ47Id3PYaQF0RifrAzNGNR+4pH0/l8eLEn4TCQcVORjMxSn8afSL371qfLp+BcYO/1SPzJUopEf7Ot/Au2lzdlnyduR+aazYn1EW1Ecuo0wno18SGokvb3ZCu/Iq/EplytdrY5ZPLamhCgM28zyPPh1TT7TB4KCWTfOH+tPqja+a/G/GyzFeDCJ6oSdsu7w1CcJ77ODVCwrhxzjcKdZdTufO/CJduGrkzCnuc+joxDgJnsZGtRy3Xsflw7W7M359o/Z5YoBPewSCWB5RamtJuvowx4Cvvkyu5Ntw93ijms4hoebI40/LaUro10KUlo3XtMaU+M5FYgBaVum2uRATe2BgREVbbGi7S0Epr99rWcJ5wZG2L/Gy3ggOqNWyhrdrF+YJ7mNSq3c1Z9byRleoDn9xwu0VjonEWxSznfiwUdsIDwKlPN55tlsxUAdZZWj81MGur2Wa5YGm3McUOYFec/UgOX9SzKD/uqMLtuRf/RjzLLiPPb6gtBXmfKA0nEqaZ9mOh7wjOOhjHjfaFQub7wNeXVqXRkQXX9MkxU/oTqsZ/nwnNCg5pSj4D/3ndVDouuBxirV4uNi5XhKuKYeGlzYpDWvb5HMX9kRAj1GIMckjLJD21TjOAr1VPChHzvxTvQ4kcyGcNOE/HUchevdYIjnRWCWsBSBhSHj/esSCoatkzqyLXE7iocl0RJkPa52HFps6Plt/OqoU1MjmVa299sisCEGAkU2KPTrRjD1Npb7wkx9Y7SB4GveVqS8Qv31QgnZyRqGGgB7k84Ezer5j6HvOyJSY="
It is not possible to come up with the comprehensive solution without seeing the full encoded data in text form, not as the image so consider extracting this rate_id from the response using JSON Extractor
It might be the case it's something easy like Base64, in that case you can use i.e. __base64Decode() function
Otherwise you need to determine the algorithm and once done you will be able to decode the data using JSR223 PostProcessor

Posting JSON as a request parameter not sending it raw

I'm sending POST request on Jmeter with one of the parameters with json format. But JMeter is not sending it as a raw as you can see below. It's encoding the json and requesting with % and numbers... **msg** should be sending raw json.
I tried various options with encoding but none is working. How can I send json as a raw as a request parameter?
POST data:
trans_code=KycPartnerSender&version=1.0&pkg_id=1234123&timestamp=123123&**msg**=%7B%22sId%22%3A%7B%22weChatId%22%3A%22jnaS001%22%7D%2C%22sInfo%22%3A%7B%22firstName%22%3A%22jnaSender001%22%2C%22middleName%22%3A%22%22%2C%22lastName%22%3A%22QA%22%2C%22dob%22%3A%221958-01-31%22%2C%22email%22%3A%22001%40ZB.CA%22%2C%22taxId%22%3A%22467456789%22%2C%22mobilePhone%22%3A%224161231234%22%2C%22workPhone%22%3A%224161231234%22%2C%22citizenCountryCode%22%3A%22CA%22%2C%22residenceCountryCode%22%3A%22CA%22%7D%2C%22sAddress%22%3A%7B%22line1%22%3A%22123+Yonge+Street%22%2C%22line2%22%3A%22Suite+1902%22%2C%22city%22%3A%22Toronto%22%2C%22countryRegionCode%22%3A%22ON%22%2C%22postalCode%22%3A%22M2M2M2%22%2C%22countryCode%22%3A%22CA%22%7D%2C%22sFundingSource%22%3A%7B%22accountNumber%22%3A%22123456789%22%2C%22accountHolderName%22%3A%22JNA+SENDER%22%2C%22routingNumber%22%3A%2200402652%22%7D%2C%22rId%22%3A%7B%22weChatId%22%3A%22jnaR001%22%7D%2C%22rInfo%22%3A%7B%22firstName%22%3A%22jnaReceiver%22%2C%22middleName%22%3A%22X%22%2C%22lastName%22%3A%22QA%22%2C%22dob%22%3A%221970-10-31%22%2C%22email%22%3A%22002%40ZB.CA%22%2C%22taxId%22%3A%22789456123%22%2C%22mobilePhone%22%3A%224161231234%22%2C%22workPhone%22%3A%224161231234%22%2C%22citizenCountryCode%22%3A%22CA%22%2C%22residenceCountryCode%22%3A%22CA%22%2C%22employmentStatus%22%3A%22Full+Time%22%2C%22occupationCode%22%3A%22102%22%2C%22industryCode%22%3A%22101%22%7D%2C%22rAddress%22%3A%7B%22line1%22%3A%22123+Bloor%22%2C%22line2%22%3A%22Suite+1900%22%2C%22city%22%3A%22Toronto%22%2C%22countryRegionCode%22%3A%22ON%22%2C%22postalCode%22%3A%22M2M2M2%22%2C%22countryCode%22%3A%22CA%22%7D%2C%22rFundingSource%22%3A%7B%22accountNumber%22%3A%22987654321%22%2C%22accountHolderName%22%3A%22JNA+RECEIVER%22%2C%22routingNumber%22%3A%2200402652%22%7D%7D
Instead of using Parameters table, select the Raw Body tab and just put your json body.
Of course it only works with Post method (not Get) so it should be ok for you.

Resources