Magento 2.0 REST API Oauth Token Request Error - rest

Trying to integrate magento 2.0 with a desktop application (i.e the desktop application should be able to create products & download orders) using the REST API.
I am trying to make a 'POST' call to Magento 2.0 token request to get the access token, however I am getting an error while sending the request: oauth_problem=Consumer+key+has+expired.
I am trying to generate the signature using:
POSThttp://xxxxxx/magento/oauth/token/request?oauth_nonce=cyzHawrmnCYz7cJT&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1474899965&oauth_version=1.0&oauth_consumer_key=xxxxxxxx

Related

WSO2 API manager returns binary response

I am very new to WSO2 API manager and trying out my very first simple restful api. which returns json response and has no security since it is an internal api.
I installed WSO2 API manager locally and trying to call the rest api on my dev server which uses http and no security as I mentioned earlier.
Here is how my get url looks like:
and here is my url looks like for production and sandbox environment:
I don't have any message mediation enabled.
I went to the API store and created a trial application (so that I can get the access token. Eventhough, my dev environment api has no security, I was reading that for throttling and other purpose, I need to pass bearer token to the WSO2 api OR it will reject the request.)
When I am trying to consume the api, I get the following binary message.
Is there any way I can see the proxy log on WSO2 server so that I can see the request and its header sent to my dev server?
How can I fix this binary response to get the proper json response?
I searched all over and can't find solution to it.
You can use below steps on WSO2 ESB or APIM to enable Wire Logs.
Uncomment below line in /repository/conf/log4j.properties
log4j.logger.org.apache.synapse.transport.http.wire=DEBUG
Restart Server.
Source - http://lakshanigamage.blogspot.com/2015/03/how-to-enable-wire-logs-in-wso2-esbapim.html

HP QC REST API for postman rest client

I tried to connect HP QC using postman rest client
The followig URL(Example)
http://qc-server.com/qcbin/rest/domains/DEFAULT_773497139/projects/773497139_DEMO/defects?username=username#gmail.com&password=mypassword
It throws error as follows
**Authentication failed. Browser based integrations - to login append '?login-form-required=y' to the url you tried to access.**
when i tried adding the parameter login-form-required=y it goes back to login page how to store session and fetch data through rest api using postman rest client.
Choose Authorization type as BASIC and Enter credential and Click Update Request.
Postman snap:

calling rest api from meteor app

How can I call a rest api with authentication from meteor, appreciate if you can guide to an example, I have added the http package to the meteor project. Using advanced rest client chrome app, I am able to get the data by passing the following URL and 2 headers. This app is using the already logged in browser session.
URL: https://xxxxx:9443/ccm/oslc/contexts/_ZoC0QNS3EeGPlow7Bl9IAw/workitems
headers: Accept", "application/json"
OSLC-Core-Version", "2.0"
How can I pass the headers and user name password of the rest api service.

OneDrive REST API

Please let me know what is the authentication method we should use when working with OneDrive REST APIs.
Is it AZURE AD using the URL https://login.windows.net/common/oauth2/authorize?
Or the https://login.live.com/oauth20_authorize.srf?
I'm trying to make a simple call to the new OneDrive REST API (I'm using Azure AD, but not sure if this is the correct Authentication method).
I'm using Postman rest client to send the request.
I have registered my application in Azure AD and given it full permissions to 'Office 365 SharePoint Online'.
I can successfully get an authorization token using the clientId generated in Azure AD.
However when I attempt to list files using following request using the access token I get the following error.
Could you please let me know what could be the issue?
RESOURCE HTTP GET:
URL: https://-my.sharepoint.com/personal//_api/Files
HEADER: Authorization: Bearer
Response:
3001000;reason="There has been an error authenticating the request.";category="invalid_client"
IF you refer the public free version of OneDrive, then you should take a look at OneDrives API Documentation. Which uses Live SDK.
If you are using the OneDrive for Business, then you should use the SharePoint 2013 APIs. For SharePoint online this Question (its answer) on SharePoint StackExchange might be helpful. OR if you look for the new-and-in-preview Office365, you might find this page interesting.
A blog post with full walkthrough and code how to authenticate to SharePoint Online with Azure ACS.
Check out the [new][1] v1.0 O365 APIs that describe the OneDrive Business and other O365 service APIs, including authentication.

Response is Unauthorize 401 while connecting to quickbook api when tokens are valid

I am using firefox rest client to make a rest request to quickbook api.
below are fields I am using :
URL : https://quickbooks.api.intuit.com/v3/company/companyId/vendor/2
Method : POST
Header : Content-Type : application/xml
OAuth :
Consumer key : ****
consumer secret : ****
Access Token : ****
Access token secret : ****
I am copying these tokens directly from https://appcenter.intuit.com/Playground/OAuth/IA
Strange part is when these tokens are used in data service of IPP V3 Java Devkit, these token works.
I have no idea why these tokens will work with data service devkit and not on rest client.
Please help. Stuck on this from last 4 days.
Why do need the rest client for? The Oauth tokens geenrated by Intuit are known to have issues with Rest Clients. That's why we have provided the API explorer to test realms-
https://developer.intuit.com/apiexplorer?apiname=V3QBO
You just need to select your company/realm there.
OR
to debug client issues, there is another OAUTH extension provided by Intuit for Fiddler2.
Fiddler2-http://fiddler.en.lo4d.com/
Extension for OAUTH 1.1-
https://github.com/IntuitPartnerPlatform/FiddlerOAuth
1) Copy the extension to ‘My Documents\Fiddler2\Scripts’ folder.
2) You will then see the OAuth settings tab when you open the fiddler client.
3) Generate the Token and Token Secret using
Developer playground -
Login into developer.intuit.com->Manage my apps->Test connect
or
Use one of the sample apps from here-
https://github.com/IntuitDeveloperRelations/
4) Add the keys generated from step above in the OAuth setting tab, and click Apply.
5) You can fire your requests using Composer tab.
6) Add the correct headers after verifying from API explorer and then Run.
7) You can then view the raw response on the right side of the tab and the status code for the response on the left side.