I am just trying to authenticate from NetSuite to docusign. I have my demo account, and am able to send requests successfully using the legacy authentication from postman.
However, when I try the same code in a server side situation, i get the INVALID_TOKEN_FORMAT error.
I've only built 3 or 4 apis so would really appreciate what I might be missing that's causing this 401 error.
NetSuite code (js syntax):
headers = {
'Accept':'application/json',
'Content-Type':'application/json',
'X-DocuSign-Authentication':{'Username':'abcusername','Password':'password123','IntegratorKey':'xyz123'}
};
res = nlapiRequestURL('https://demo.docusign.net/restapi/v2/login_information', '', headers, 'GET');
Ok solved! The authentication object needed to be in xml. Confused bc of the content type and the documentation shows JSON
Related
I'm trying to sign in to HP ALM via its Rest API using Postman.
Following the reference for 12.50 version (https://almsyngenta.saas.hpe.com/qcbin/Help/doc_library/api_refs/REST/webframe.htm#sign_in.htm), I'm sending a POST request to:
https://almalm1250saastrial.saas.hpe.com/qcbin/api/authentication/sign-in
Using the header:
Authorization: Basic <Base64-encoded username:password>
And the response i'm getting is:
HTTP Error 403 - Problem accessing /qcbin/api/authentication/sign-in. Reason: Forbidden
Does anyone know what's wrong with my request? I'm just following the reference I linked above.
NOTE: The account used for the sign in process is a trial account and I can sign in with any problems from a browser.
Thanks, This looks to be an issue with the backend. I tried to hit the URL from your image and I got the same error ( 403 )
whereas on the other hand, if the URL was to accept API requests and if the user details are incorrect the below would be the response
Below is my analysis on REST API call to ALM . Go through here
You can request for ALM database API and use the same API to report UiPath results. It will go directly into ALM server. But you need to work with ALM server admins in your organization for this.
You need ALM server side customization is required.Please find out ALM APIs which will accept data from other sources. use those APIs in UiPath and you can integrate both.
HP ALM Supports Rest API’s So you can also give it a try with HTTP REquest Activity.
From https://{host}/qcbin/authentication-point/authenticate
In Postman enter the URL
Add below Headers(for instance, using JSON): "Key":"Content-Type", "Value":"application/json"
Select the desired method i.e. POST
Click on Body, choose raw and provide following data in body of request
{
"username": "value",
"password": "value"
}
Click Send button to hit the API.
Make sure status returns 200/OK response
If there is a functionality for token, the response body must contains Token
Hope my answers will helps you.
See also the following references:
AMD help
Youtube
Bolte 1
Bolte 2
Quora
Host
Test Guild
Imgur
Guru99
I'm trying to use the Firefox Rest client extension to test out my Magento REST API. I followed this guide but I keep getting the "signature_invalid" error when making the final request to receive the access token.
Guide: http://devdocs.magento.com/guides/m1x/api/rest/testing_rest_resources.html
The URL I use for the final request is:
http://mymagento/oauth/token?oauth_callback=http://httpbin.org/get&oauth_token=99e48f7d46d3a2f8fef704865fe2f4e4&oauth_secret=eda948ee46250f335146f6f4c5f7d622&oauth_verifier=1d977f0b96f3ae07fff515c590ec6709
And these are the readers:
OAuth oauth_version="1.0", oauth_signature_method="HMAC-SHA1",
oauth_callback="http%3A%2F%2Fhttpbin.org%2Fget",
oauth_token="99e48f7d46d3a2f8fef704865fe2f4e4",
oauth_secret="eda948ee46250f335146f6f4c5f7d622",
oauth_verifier="1d977f0b96f3ae07fff515c590ec6709",
oauth_nonce="OmOzMMy2Z60m5sV", oauth_timestamp="1495611445",
oauth_consumer_key="abc77ce5a53e67333af04807dea1356b",
oauth_signature="tE6xzRXZIc4BPQ3Dxc80ddoitLg%3D"
The nonce, timestamp and signature are automaticly refreshed each request.
I'm using Magento CE 1.9.2.2.
I have also tried Postman, but that tool gives me a nonce_used error with every request, even though it's automaticly refreshed... Permissions are correctly set up as explained here: http://inchoo.net/magento/configure-magento-rest-and-oauth-settings/
Everything goes fine using the Rest client extension untill the final request where I want to receive the access token.
I found the solution... The local browser had cached the oauth responses...
I am trying to access zomato api.
URL: https://developers.zomato.com/api/v2.1/categories
Headers: 'X-Zomato-API-Key':'myapikeyhere-763demoapi434'
If I use chrome's postman extension or curl then I can access the url & getting 200 status code.
But if I run it through my angular2 app or simple ajax, it is giving error at preflight OPTIONS request, error code is 501. I have tried otherways too, error is same. Need help
Zomato API's can only be accessed from server to server calls, the error message you have reported is a security policy implemented by Chrome to prevent cross site request forgery on the client side.
A way you can get around this is to write a handler on your server end to make handler which the ajax call will use, this handler in-turn makes a request to the Zomato's server to retrieve the data required.
Here I am provideing you the complete scenario where I am getting the error while posting request for creating a new account.
I am using Intuit OAuth Access and OAuth API console for testing (Using all security tokens).(https://appcenter.intuit.com/Playground/OAuth)
And the URL and request:
URL: https://services.intuit.com/sb/account/v2/570357960
Method : Post
Format: XML/JSON
Request:
<?xml version="1.0" encoding="UTF-16"?><Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" RequestId="4df87bw2-916a-
4r95-h5d6-06dce3667562"
xmlns="http://www.intuit.com/sb/cdm/v2"><ExternalRealmId>570357960</ExternalRealmId><Objectxsi:type="Account"><Name>CurrentAccount</Name><Active>true</Active><Type>Expense<
/Type><Subtype>Expense</Subtype><AcctNum>1111</AcctNum></Object></Add>
And getting the response (error in html):
<div class="content-container"><fieldset>
<h2>500 - Internal server error.</h2>
<h3>There is a problem with the resource you are looking for, and it cannot be displayed.</h3>
and I have also checked with RESTClient utility, but getting the same above error.
Please note that the same url
(https://services.intuit.com/sb/account/v2/570357960) with same
security tokens is working fine for GET data , I am getting data from
QB desktop into my online Application.
As Keith said, check the Content-Type. You will also need to use a RestClient for testing. The playground will not work for testing API calls. It only works for platform calls.
If I had to guess... I'd guess you're sending the wrong Content-Type header... but it's impossible to tell for sure until you post more code/the rest of your HTTP request.
A few things to try. Be sure the XML is in the same order as this sample and try it.
the other is a common mistake when you use Oauth in a GET you are including just the url in the signature, but in a POST you need to include the Body in the signature too or it will not pass Oauth validation.
Lastly, as Keith mentioned to check the content type. Although you would generally get a content type error.
156234822
CurrentAccount
true
Expense
Expense
1111
I am new to Sinatra and want to get it working with oauth2-provider gem. I followed instruction https://github.com/songkick/oauth2-provider#readme and looked at example. But after i've got access_token, i can't get information from Oauth endpoint using this. It generate 401 not Unauthorized error. From my application i do request
http://localhost:9292/me?access_token=, i've tried html request as well as json request, but without success.
Anybody faced with this problem ?
Looks like you did your request using HTTP vs HTTPS. Did you try setting Songkick::OAuth2::Provider.enforce_ssl = false for now?