Example:
bitcoin:?r=https://bitpay.com/i/WEZPwt4tjjN9UXZrxSnTKu
It not gone work now, because bitpay payment is available only 15 minutes. But if you have an active payment it opens your Bitcoin app (f.e. Bitcoin core) and make your forms filled.
How to do smartlink like this? If im using simply URI I can put bitcoin:1ADDRESS?amount=1 etc., but I want to do it like a Bitpay.
The argument r= is defined in BIP-72 and means that more details must be obtained through the link
Bitpay uses Bitcoin Payment Protocol defined in BIP 70 Protocol
But if you open the link in a browser, it will show bitpay invoice page. In this case you need to pass a HTTP header to get the real payment request:
wget --header="Accept: application/bitcoin-paymentrequest" https://bitpay.com/i/WEZPwt4tjjN9UXZrxSnTKu
It will return a protocol buffer, is what your application should do.
Related
I'm trying to add param in the url, like in this example:
https://www.google.com/ > https://www.google.com/search?q=qq
Opening the last link you can see "qq" in the "q" input.
For this site it doesn't work (this is the problem):
https://www.calabriasue.it/assistenza/richiesta-assistenza-e-supporto/
https://www.calabriasue.it/assistenza/richiesta-assistenza-e-supporto/?nome=mario
Can I add url param also in the last one? I need it.
Thanks!
I tried using different input names, different params ecc but it doesn't work.
Google's server side code is designed to generate an HTML document with an input field that is prefilled with the current search term which is reads from the URL. That is why adding q=search+term to the URL populates the input field.
You can't make arbitrary third-party websites prefill inputs. They have to explicitly provide a mechanism to make it possible.
Parameters only work as long as the code for the target website is expecting to handle a parameter named "nome" with a value "mario". In the case of the google website, it is expecting a parameter named "q" and has a form input for it.
Clicking a URL sends a a GET request type, and the target site may only be accepting parameters from a POST request type. You could consider using the application known as "PostMan" to help with that.
Alternately, the target page you are viewing may be forwarded / routed from a different page which accepts parameters.
I have two page
Login/Registration Page as of now
OTP Verification Page
API has been created and in api, we are passing phone number as request and gets otp as response. However i would like your help to know how should i able to pass the phoneNumber textfield data to APIcall json request in flutterflow?
If there is anyway or any documentation will be really helpful?
I have tried with variable method, however i was not able to pass it to json.
I have also tried jsonpath method, but no luck.
Define dynamic part of API url with brackets
https://jsonplaceholder.typicode.com/posts/[postId]
https://jsonplaceholder.typicode.com/comments?postId=[postId]
then create the variable (postId) with the same name. When adding the API call, it is required to add these variables.
See API Calls 101 for details.
For prebid-server the example shows json='{"pageOpts": {"member": 958,"invCode": "ast_guaranteed_prios_1","..., especially the member value. Without setting this, requests to https://ib.adnxs.com/ut/v3
fail with
{"error":"Could not find valid member in request"}
What is pageOpts.member? Which value should it be set to?
The example you gave is not for prebid-server, it is for accessing Appnexus directly. In order to setup prebid server you should follow their AMP instructions here. Also, to debug the auction on the client side you can add: &debug=1 to the url that sends the request to prebid-server, it generally is prebid.adnxs.com/pbs/v1/openrtb2/amp?, however that will be different if you use your own hosting.
Short question: Using the get_invoices endpoint, when I try to access the URL from the InvoiceFiles.pdfFileUrl response, it pops up a api.zuora login form. I need my customers to be able to access these PDFs.
If I enter my Zuora creds, it will display the invoice, but of course my customers don't have Zuora creds.
Is there some sort of setting to allow customers to view PDFs from the URL?
Long Question:
The get_invoices endpoint returns 2 items of interest.
body is the REST URL of the invoice PDF file.
and
InvoiceFiles returns
id ID of the invoice PDF file. This is the ID for the file object and different from the file handle id in the pdfFileUrl field. To open a file, you need to use the file handle ID.
versionNumber Version number of the invoice PDF file
pdfFileUrl REST URL for the invoice PDF file. Click the URL to open the invoice PDF file.
Is there a difference between what is returned by body and InvoiceFiles.pdfFileUrl, and how do I use them correctly?
The pdfFileUrl can return multiple files. Each time the invoice is update (the customer pays etc) it generates another file. The most recent is the at index 0.
However trying to access any of the URLs, I get a api.zuora login form. If I enter my Zuora creds, it will display the invoice, but of course my customers don't have Zuora creds.
The example on the endpoint page has both the body and the pdfFiles return as blank so that doesn't help much.
Searched through their community for a while, nothing couldn't find anything remotely similar to my issue.
We finally figured out how to do this. Has to be done server side.
First step was to call "/transactions/invoices/accounts/{accountId}" to get a list of invoices.
Second, pick the invoice out of the list that matched the invoice number we were trying to view.
On that object is a list called "invoiceFiles" - if it was non-empty, grab the first item.
Use the "pdfFileUrl" property on that item as the URL to fetch the PDF from, but in the GET request, include headers "apiAccessKeyId" and "apiSecretAccessKey" with the values set to our applicable api key. This eliminates the auth problem, but also makes it so you have to do this on your backend to avoid exposing your apiAccessKeyId and Secret.
Assuming the request for the PDF coming into us was authenticated, we'd do a pipe command on the response coming back from Zuora onto the outgoing response we are currently handling on our server: zuoraResponse.pipe(ourOutgoingResponseObj)
This will display the PDF directly to the user.
The best practice would be to use an authorization cookie. The cookie authorizes the user to make calls to the REST API for the duration specified in Administration > Security Policies > Session timeout in Zuora settings. The cookie expiration time is reset with this duration after every call to the REST API.
To obtain a cookie, call the REST connections resource:
curl -X POST \
-H "apiAccessKeyId: dummyUser" \
-H "apiSecretAccessKey: dummyPassword" \
-H "Content-Type: application/json" \
-d '{}' \
"https://rest.zuora.com/v1/connections"
Once the connection is established, subsequent API calls will work without the apiSecretAccessKey and apiAccessKeyId in the header.
Please find more details from their new API document.
https://www.zuora.com/developer/api-reference/
I'm trying to get Twitter authentication working on my ASP.NET site. When you create the app on the Twitter website, you have to specify a callback URL, which for sake of argument, I have set to http://mydomain.com
I've read the oAuth 1.0a spec, and to override this callback URL with your own custom one you have to send the oauth_callback parameter in the request_token phase (url-encoded of course).
So my request URL looks like this:
http://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Fmydomain.com%2Ftwittercallback
Supposedly, if all goes to plan, in your response data, you are supposed to receive a new parameter of oauth_callback_confirmed=true in addition to your token and token secret parameters.
However, my response comes through as:
oauth_token=MYTOKEN&oauth_token_secret=MYTOKENSECRET
I know I haven't given you guys the greatest amount to go on, but I'm at my wits end as to why I am not receiving the oauth_callback_confirmed parameter. Without this, my application keeps defaulting back to the callback URL hard-coded on the Twitter website. Please if anyone could help me out, I will be eternally grateful!
Thanks,
A.
I've read the oAuth 1.0a spec, and to
override this callback URL with your
own custom one you have to send the
oauth_callback parameter in the
request_token phase (url-encoded of
course).
So my request URL looks like this:
http://twitter.com/oauth/request_token?oauth_callback=http%3A%2F%2Fmydomain.com%2Ftwittercallback
just because YOU read the spec doesn't mean that TWITTER read it. :P
kidding - this is essentially correct - but the way twitter likes to receive this data is a little different (and not well documented).
the way i've found to get the oauth_callback to confirm is as follows: specify the oauth_callback in the parameters of the request function, NOT within the URL.
python example (using oauth2):
''' Create our client.'''
client = oauth.Client(consumer)
''' do the request '''
resp, content = client.request(request_token_url,"POST",body=urllib.urlencode({'oauth_callback':callbackURL}))
''' note that it's called "body" in this particular OAuth function for Client but in OAuth Request object it's called "parameters." YMMV depending on programming language/ library of course. '''
this is ALSO the only way i've managed to get an oauth verifier back. supposedly one should not have to specify the callback URL every time, since we provide it in app settings...but experience seems to indicate otherwise.
finally, please be aware that at leg 3 you have to do the same thing AGAIN - this time including the oauth_verifier as well as the callback URL in the parameters.
hope this helps - can't begin to tell you how much effort i put into figuring this out.
good luck!
J
I've used this guide to set up my PC to be used as the callback location. Basically you set up your hosts file in a certain way, clear your cache and add a couple of Firefox registry values. At the end when you are debugging an oauth call the redirect comes back to your local PC.
As I said it worked for me.
<?php
// oauth-php example
$token = OAuthRequester::requestRequestToken(
$consumer_key,
$user_id,
array('oauth_callback'=> urlencode($callback_uri))
);
?>