implementing REST sdk for custom platform - json

I am implementing paypal REST integration for a new platform
I got stuck and would apprecıate any help
The interesting problem I get is the REST request I copied from the documentation page gives error. https://developer.paypal.com/docs/rest/api/payments/
I am not using command line but a little windows app to send web requests.
I just used exact same payload and got this error
The remote server returned an error: (503) Server Unavailable.
{"name":"INTERNAL_SERVICE_ERROR","information_link":"https://api.sandbox.paypal.com/docs/api/#INTERNAL_SERVICE_ERROR","debug_id":"c4a8716d8a791"}
The C# sample from the github works and when I use th json it generated everything works ok.

I found out that if I change the cardnumber the sample works. Will let paypal team now.

Related

Creating scene definition against beta server gets 422 error

I'm trying to use the Unity AR/VR Toolkit with a SVF file I've created by following the test-2legged script. My understanding from this answer is that the script needs to be updated to use the new server (https://developer-api-beta.autodesk.io) and a URL-safe encoded URN everywhere. I've done that, but when I try to create the scene definition (PUT /arkit/v1/${urn}/scenes/${scene}) I get a 422 with a msg of "must be a valid Bearer token for the requested resource (TK1-003)" (I've tried giving the token all scopes listed in the Forge docs).
This works fine with the server in the non-modified test-2legged script. I'm operating on a file that's already in Forge so I'm not including the bucket, and I've experimented with including and not including the object ID; the default server (https://developer-api.autodesk.io) works fine with just an urn; the beta server I can't get to work no matter what I try.
I don't see any documentation for this endpoint so I'm not sure if it's use changed between the servers. As far as I can tell, in the toolkit I can't get SVF files created against the non-beta server (I get 404's for the meshes), so I'm assuming I should be on the beta server, but I can't get it to work.
I took a look into the source code and TK1-003 means that the Bearer token was either invalid, expired, and the token was missing the data:create data:write scoped for this operation. Note that in case, you call and API with an invalid token, the server bans you for couple of minutes.
If you still having issues, please let me know and I'll remote assist you.

How to get json data using REST API for on-premise TFS

We have on-premise TFS Version 15.105.25910.0 i.e TFS 2017 and I am trying to get JSON data (let's say for a given Work Item id). I am using Postman to send/receive request. I was having an issue with permission denied then figured out a way to pass Personal access tokens in the request.
Our basic TFS Url looks like this:
http://tfs.blahblah.org:8080/TFS/MyOrgName/Software%20Group
How to correctly get JSON data?
Reference material used:
Reference 1
Reference 2
Currently I am getting 200 OK status but the content type is HTML which says Javascript is Disabled. Not sure where the problem is occuring?
Feel free to ask more info if needed.
First, you are using TFS 2017 RTM version, it's suggested to upgrade to the latest Update 3.1 edition.
Then, please check your Postman's version, make sure you are using the latest version v6.1.4. You could download the latest version from website below: https://www.getpostman.com/
Last, check whether you have correct api. The REST API to get a single work item is as below:
Get http://TFS2017:8080/tfs/DefaultCollection/_apis/wit/workitems/{id}?api-version=3.2
Attach a screenshot of the result in Postman:

iTunes Store Customer Reviews API XML Endpoint Broken

I used to use the XML endpoint because it provided review dates for each review called 'updated'. This is not contained in the JSON endpoint. However, the XML endpoint stopped working. I get the error seen below:
Web Server Error
Description: The host did not return the document correctly.
Has anyone experienced the same issue? Any workarounds? Do you anticipate this will ever be fixed by Apple? Do you think the JSON endpoint might be taken down any time soon?
XML Endpoint (Broken)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/xml
JSON Endpoint (Working)
https://itunes.apple.com/us/rss/customerreviews/id=1145275343/mostrecent/json
It appears the XML endpoint is up and running again. No more Web Server Error. Hopefully the endpoint stays up.

Getting "The server encountered an error processing the request. See server logs for more details." when sending a POST via the Chrome Postman plugin

I have been looking for a way to understand the root cause of the "The server encountered an error processing the request. See server logs for more details." problem in my particular case but none of the existing online solutions addresses the problem I am about to describe.
I need to send POST requests with JSON payload {"userName", "Adnan"} to an Azure-based web service which eventually retrieves some database GPS records in a HTTP response. My initial attempt to test this POST request worked fine via Fiddler (See image below) and Android OKHttp libraries.
However, when I tested the same request over my ultimate 3G platform, it gave the above-mentioned error. I managed to replicate the same error with the Chrome Postman plugin (See image below). It must be noted that even if I am sending the data as a JSON payload, the same error appears on the Postman plugin. Almost all the solutions to this problem online suggest on tweaking the webservice itself which should not be the case as it works fine with Fiddler and Android. So - my question is why the POST request shown above is not working with the Postman plugin. I believe if the problem is resolved on Postman, it would be resolved on my 3G embedded board as well. Thank you.

Assistance required to connect to Foursquare via TIBCO BW using REST / JSON API - 1.1

We have an assignment to check the compatibility of Quick connect project for Foursquare against the REST/JSON 1.1.
When I am testing the process, while invoking Rest API for query Check-in, the process is throwing an error – “OAuth token invalid or revoked”. Can you kindly help to fix this issue.
Access_token for this was generated by registering a sample app with Foursuare.com, having www.google.com as welcome page and redirect URL. Please let me know if this is causing the issue.
Also, let me know is there is any standard method to generate the access_token for this.
Thanks in advance.
Regards,
Shree.
It sounds like you're not following Foursquare's instructions on connecting properly, or need to reconnect to get a new access_token. Keep in mind that the access_token isn't the code that comes back in the redirect, the code needs to be used to exchange for the access_token.