"The user to send to could not be found" when using API, using an e-mail identifier - dwolla

for example this query:
curl -H "Content-Type: application/json" \
-d '{"oauth_token": "...","pin": "....","destinationId": "reflector#dwolla.com","amount":"0.5","fundsSource":"..."}' \
https://www.dwolla.com/oauth/rest/transactions/send
returns the following error:
"Success":false,"Message":"The user to send to could not be found.","Response":null
I also tried with a confirmed user account. I can send money using a dwolla number ID, but when using an e-mail I see the error The user to send to could not be found.
Why is this happening?

You need to specify the "destinationType" if "destinationId" is anything other than a Dwolla account key.
Possible values: 'Dwolla', 'Facebook', 'Twitter', 'Email', 'Phone'
Defaults to: 'Dwolla'

Related

Keycloak bulk user import

Does anyone have any thoughts on how one might import a very large number of users into Keycloak.
We are in the process of upgrading from 2.5.5 to 4.0.0 and have had to switch from MongoDB to MySQL. We have been able to export our user base but with 280k+ users to import back into Keycloak. The import process takes 25 mins to import one file of 500 users, which doesnt really seem practical as that would take us approximately 9/10 days to import the user base if we were working 24/7.
Any thoughts or ideas would be appreciated.
I realize I'm a little late to the party here...
Keycloak 8 (and newer) has a mechanism for bulk importing users via a .json file: https://www.keycloak.org/docs/8.0/server_admin/index.html#_export_import
If you have some sort of mechanism for dumping your existing users to a .json file, it makes the import reasonably easy.
You can use the Keycloak REST API with partialImport
First, you need to get an access_token, you can use your admin user or a client with the role manage-realm assigned
access_token=`curl http://localhost:8080/auth/realms/my-realm/protocol/openid-connect/token -XPOST -d 'grant_type=client_credentials' -u 'admin-client:admin-secret' | jq -r .access_token`
Then you can import an array of users
curl -X POST -H "Authorization: Bearer $access_token" -H 'Accept: application/json' -H 'Content-Type: application/json' -d '{"users":[{"username":"jose.perez","email":"jose.perez#gmail.com","firstName":"Jose","lastName":"Perez","emailVerified":true,"enabled":true,"ifResourceExists":"SKIP"}' http://localhost:8080/auth/admin/realms/my-realm/partialImport

Where to find paykey for an order in woocommerce for adaptive payments?

I created a sandbox app for my ecommerce website. I placed many orders with paypal payments. But i am not getting paykey associated with the orders, i am only getting transation id. I want to get paykey for a particular order, so if i want to refund to that order i can use that paykey for that. Where have i found that paykey associated with each order. I am using adaptive paypal payments refund api and i need paykey to refund for an order. The code is below in which i need paykey
curl https://svcs.sandbox.paypal.com/AdaptivePayments/Refund \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: api_username" \
-H "X-PAYPAL-SECURITY-PASSWORD: api_password" \
-H "X-PAYPAL-SECURITY-SIGNATURE: api_signature" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" \
-H "X-PAYPAL-APPLICATION-ID: your_app_id " \
-d requestEnvelope.errorLanguage=en_US \
-d payKey="where to find"
so can anyone tell me why i am not getting paykey for an order ?
The pay key comes back in the response to the Pay request sent to PayPal. Whatever plugin or code you're using for the checkout should be saving that for you in a session, in the database, or somewhere. You'd need to track that down and make sure it's getting saved in the DB so that you can pull it when you need to.
Orders stored in wp_posts table where the post_type = shop_order.
But that only stores the basic info as Order's Title and Date with an "ID".
All the details of that order stored in wp_postmeta table using that post_id of the order. So we can search in wp_postmeta table using order id like post_id='123456' . There a paykey stored in there.

What's the proper way to update the "published" field on a Photo using the Facebook Graph API?

When I try to update the published field on an existing Photo object I get: OAuthException code 1: "An unknown error has occurred." Here's what I'm trying:
Upload an image:
$ curl -X POST -F published=false -F "access_token=$TOKEN" -F file=#soccer.jpg https://graph.facebook.com/$ALBUM_ID/photos
Grab the link and verify that the link shows up for me, but not my friends:
$ curl -X GET "https://graph.facebook.com/v2.6/$PHOTO_ID?fields=link&access_token=$TOKEN"
Set the published bit:
$ curl -X POST -F published=true -F "access_token=$TOKEN" https://graph.facebook.com/$PHOTO_ID
{"error":{"message":"An unknown error has occurred.","type":"OAuthException","code":1,"fbtrace_id":"D+Z1Gs9zZat"}}%
According to the docs that field is available for updating. So is this a documentation bug or an API bug?
I'm trying to upload a bunch of pictures with published=false and then publish them all at the same time later by just updating the published field.
Looks like there's currently a bug in the platform. Here's the bug report.

Getting an error when I run a V().has() gremlin query against IBM Graph service on bluemix

I created an instance of IBM Graph service on bluemix and created some vertexes. When I try to issue a gremlin query to find one of the vertexes I created, I get an "Internal Error".
Here's the query I'm using
Create the Vertex
curl -u username-password -H 'Content-Type: application/json' -d '{ "label":"movie","properties":{"Name": "Million Dollar Baby","Type": "Movie"} }' -X POST "http://../g/vertices"
Reponse
{"requestId":"07f29cea-25b3-4305-b74b-540466206872","status":{"message":"","code":200,"attributes":{}},"result":{"data":[{"id":8336,"label":"movie","type":"vertex","properties":{"Type":[{"id":"36a-6fk-1l1","value":"Movie"}],"Name":[{"id":"2s2-6fk-sl","value":"Million Dollar Baby"}]}}],"meta":{}}}
Query whether the vertex has a Type property 'movie'
curl -u username-password -H 'Content-Type: application/json' -d '{"gremlin": "def g = graph.traversal(); g.V().has('Type','movie')"}' -X POST "http://../g/gremlin"
Response (Error)
{"code":"InternalError","message":""}
IBM Graph requires users to create indexes for any property that they are going to issue queries against. In this case 'Type' is a property and is included in a gremlin query.
You need to create an index using the /schema endpoint which is provided by the IBM Graph service in bluemix.
An example of this is provided in the Service Getting Started guide
http://ibm-graph-docs.ng.bluemix.net/gettingstarted.html

parse.com REST API is not returning all of the properties for one of my classes

I've been using Parse from an iOS app and wanted to fetch some of the data from a web app using the REST API. Following the docs, I tried this on the command line:
url -X GET -H "X-Parse-Application-Id: MYAPPID"
-H "X-Parse-REST-API-Key: MYAPIKEY"
-G --data-urlencode 'limit=1'
https://api.parse.com/1/classes/MyClass
However, it isn't returning properties for all of the columns in my parse app.
What could be happening? It's possible there is some configuration in Parse, but I can't find it. There are no special security settings for that table.
I figured this out myself. The default query returns the oldest records first. I believe some columns were added later, and there must be no data in the early records. When I request the data ordered by most recent first, then I see all of the columns:
url -X GET -H "X-Parse-Application-Id: MYAPPID"
-H "X-Parse-REST-API-Key: MYAPIKEY"
-G --data-urlencode 'limit=1'
--data-urlencode 'order=-createdAt'
https://api.parse.com/1/classes/MyClass