VALIDATION_ERROR : "Field is invalid in a request" - paypal

I am trying to create agreement using paypal rest api.
POST https://api.sandbox.paypal.com/v1/payments/billing-agreements
In the request body i am passing "agreement_details" and other required fields such as name , description etc as per the documentation.
https://developer.paypal.com/docs/api/payments.billing-agreements#agreement_create
"agreement_details": {
"outstanding_balance": {
"value": "0.00"
},
"cycles_remaining": "4",
"cycles_completed": "0",
"final_payment_date": "2016-12-22T20:53:43Z",
"failed_payment_count": "0"
}
Status: 400 Bad Request
{
"name": "VALIDATION_ERROR",
"details": [
{
"field": "agreement_details",
"issue": "Field is invalid in a request."
}
],
"message": "Invalid request. See details.",
"information_link": "https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR",
"debug_id": "2fcb57fb9581f"
}

Related

"Authorization failed due to insufficient permissions" PayPal in production

I am using the Paypal payment gateway in our app. Everything works fine in the sandbox account. Now I have replaced the sandbox with live credentials but it gives this
Error Response
{
"name": "NOT_AUTHORIZED",
"message": "Authorization failed due to insufficient permissions.",
"debug_id": "d82feab10c9ee",
"information_link": "",
"details": [
{
"issue": "PERMISSION_DENIED",
"description": "You do not have permission to access or perform operations on this resource."
}
],
"links": []
}
I am requesting to this URL https://api-m.paypal.com/v2/customer/partner-referrals
Request Payload
{
"operations": [
{
"operation": "API_INTEGRATION",
"api_integration_preference": {
"rest_api_integration": {
"integration_method": "PAYPAL",
"integration_type": "THIRD_PARTY",
"third_party_details": {
"features": [
"PAYMENT",
"REFUND"
]
}
}
}
}
],
"products": [
"EXPRESS_CHECKOUT"
],
"legal_consents": [
{
"type": "SHARE_DATA_CONSENT",
"granted": true
}
],
"partner_config_override": {
"return_url": "....."
}
}

Facebook Conversions API server-side event returning "The parameter $['data'][0]['event_time'] is required"

When setting up the the Facebook Conversions API I get the following error...
{"error"=>{"message"=>"Invalid parameter", "type"=>"OAuthException", "code"=>100, "error_subcode"=>2804019, "is_transient"=>false, "error_user_title"=>"Server-side API parameter error", "error_user_msg"=>"The parameter $['data'][0]['event_time'] is required.", "fbtrace_id"=>"AaHYqjNBCshoHed-uN2beUP"}}
However I am providing the event_time parameter as requested in the docs.
{
"data": [{
"event_name": "ViewContent",
"action_source": "website",
"event_source_url": "https://www.mywebsite.com",
"event_id": 123,
"event_time": 1666473604,
"user_data": {
"client_ip_address": '11.11.11',
"client_user_agent": 'user-agent'
}
}],
"test_event_code": 'TEST45392'
}

How I can create payment document in FlowPay

According to document I am testing API using Insomnia. Generating a payment document is a single operation that I have used a single POST call to the intended document endpoint
create, for example:
POST https://app.sandbox-new.flowpay.it/api/:tenantID/invoices
Content-Type: application/json
Authorization: Bearer <accessToken>
Body:
{
"attachments": null,
"currency": "EUR",
"date": "2022-08-23T17:32:28Z",
"items": [
{
"amount": 123.12,
"description": "hello",
"quantity": 1
}
],
"number": "123465",
"recipientIban": null,
"recipientVat": "132412341",
"senderIban": null,
"senderVat": "23412341245",
"terms": [
{
"amount": 123.12,
"description": "hello",
"expire": "2022-08-25T17:32:28Z",
"information": "hello",
"method": null,
"recurringInfo": null
}
]
}
To get :tenantID I have followed flowpay documentation
But I am getting not authorized to upload this invoice error message.
{
"errorDescription": "not authorized to upload this invoice",
"code": 2003,
"statusCode": 401,
"requestID": "1FAF3537-FA0B-4642-AF75-94FE9FDC8E2A",
"service": 2
}
Any body help me please. Thanks

PowerBI REST API - Failed to create a new datasource on the specified gateway

I'm following this page in order to create a new PowerBI datasource.
And used this kind of body for the POST request:
{
"connectionDetails": "{\"server\":\"aaa\",\"database\":\"bbb\"}",
"credentialDetails": {
"credentialType": "Basic",
"credentials": "{\"credentialData\":[{\"name\":\"username\", \"value\":\"ccc\"},{\"name\":\"password\", \"value\":\"XoZT6aM1r0puO\"}]}",
"encryptedConnection": "Encrypted",
"encryptionAlgorithm": "RSA-OAEP",
"privacyLevel": "None",
"useEndUserOAuth2Credentials": "False"
},
"datasourceName": "ddd",
"dataSourceType": "Sql"
}
But getting the below error for the POST request:
{
"error": {
"code": "DM_GWPipeline_UnknownError",
"pbi.error": {
"code": "DM_GWPipeline_UnknownError",
"parameters": {},
"details": [
{
"code": "DM_ErrorDetailNameCode_UnderlyingErrorMessage",
"detail": {
"type": 1,
"value": "The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters. "
}
},
{
"code": "DM_ErrorDetailNameCode_UnderlyingHResult",
"detail": {
"type": 1,
"value": "-2146233033"
}
}
]
}
}
}
Any advice would be appreciated!
Thanks in advance.
BTW, as an alternative I would be happy to know if there is a powershell code that was found as working.

LinkedIn Share API returns 400 error - "Owner entity type person is not supported"

I am using the below body to hit the LinkedIn Share API endpoint. Unable to figure out what exactly is the reason for this error and no mention of this in the documentation.
POST REQUEST:
{
"content": {
"contentEntities": [
{
"entityLocation": "https://www.sample.com",
"thumbnails": [
{
"resolvedUrl": "https://www.sample.com"
}
]
}
],
"title": "Test Share with Content"
},
"distribution": {
"linkedInDistributionTarget": {}
},
"owner": "urn:li:person:_EELFb0y",
"subject": "Test Share Subject",
"text": {
"text": "Test Share!"
}
}
RESPONSE:
{
"message": "Owner entity type person is not supported",
"status": 400
}
Any help on this?
[Official LinkedIn API DOCS]
In v2 API, LinkedIn uses "author", not "owner"
{
"author": "urn:li:person:8675309",
"lifecycleState": "PUBLISHED",
"specificContent": {
"com.linkedin.ugc.ShareContent": {
"shareCommentary": {
"text": "Hello World! This is my first Share on LinkedIn!"
},
"shareMediaCategory": "NONE"
}
},
"visibility": {
"com.linkedin.ugc.MemberNetworkVisibility": "PUBLIC"
}
}
May be that is the reason for that status=400