I'm trying to get an XML file result of an API call and a digest Auth.
A similar question was answered here
REST API calls through Pentaho Data Integration (Spoon)
but I must be missing something.
the first REST client steps returns a 401 and a responseheader like this:
{"Transfer-Encoding":"chunked","Server":"nginx","WWW-Authenticate":"Digest qop="auth", realm="myapiserver", nonce="o7NrGEdcLsmv7Rm25uBJPn7HLRS9nYv_1665392364"","Connection":"keep-alive","Date":"Mon, 10 Oct 2022 08:59:24 GMT"}
but the token field is empty/blank. How do I get the token to pass to the following step?
Thx Marc
Related
In Integration from Salesforce to Snowflake , how long can I make authorization code to be used .I am not worried about access token or refresh token .The first stage authorization code .
I presume that you are having "Authorization_Code" OAuth grant-flow and the authorization code generated as the first step for this is the one which you are looking for.
Ideally it is 5 minutes but can be set lower value as well. More details regarding this are provided here:
https://www.oauth.com/oauth2-servers/authorization/the-authorization-response/#:~:text=The%20authorization%20code%20must%20expire,the%20codes%20should%20be%20documented.
When should an OAuth authorization code expire?
I have a Basic API connection from Recurly. I want to use that API to get data about my Data Base using Azure Data Factory. I created ls_RestAPI, created ds_RestAPI and created 1 pippeline to proceed to get the data. But there are some problems. My API has Basic Auth as username and no password (Postman Image), header is Accept and Authorization.
When I start connecting it using ADF, it throws an error due to incorrect syntax. I have provided pictures for you to understand easily.
I tried to remove or edit Accept and Authorization but it still doesn't work:
How can I reconfigure it properly to be able to get data from the above API?
My aim is that after running, Rest API can call all Next Page of API in 1 run. So I use:
"paginationRules": {
"AbsoluteUrl": "$.next"
but now I have the problem that I can't connect to the API.
ADF Rest connector only expects a Json response. This is mentioned as a warning in one of your screenshots.
As a result, this is overriding what you have entered for Accept Header.
Could you try firing this API call from some other service like Logic apps?
I am a beginner in JMeter, trying to perform load test to my Rest API. First, the Get request gets the access_token as below:
Then the following Post request runs with that authorization token to produce the Json, but I am missing something so the Post Request is failing as Authentication denied as below,
Added the Regular expression extractor to extract the token from the Get request's response as below:
Then storing it in the HTTP Header Manager in a variable as below
I am missing to link the value to the Post request, I dont know how to do it, please help.
In header manager, instead of access_token, the header name should be Authorization. Please reconfirm this with developer team / retry this same request in postman
The regex expression used should look something like this
"access_token":"(.*?)"
Also, another pro tip: because the response to getToken api call is JSON, you can use JSON Post Processor to extract the access_token by saying something like $.access_token. It is much clean way to process JSON object.
I need to read/write an azure storage table.
The client program is configured to use a shared access signature to read/write remote azure table.
Can anyone give me a good example of how to construct the authorization header in order to use the sas?
I am getting HTTP error code 403.
Microsoft documentation specified that all the rest API will have to be embedded with an authorization header. By default, the documentation suggests that I can use the storage account access key to generate the HMAC-SHA code for the authorization header. I think I am missing something here.
The whole idea of using a shared access signature (SAS) is to protect the storage account access key. At the same time, the doeumentation seems to suggest that the storage account owner needs to provide the account access key so the client can use the access key to generate the HMAC-SHA code. What am I missing here? can anyone shed some light here? Thanks,
If you're using sas_token in the request url, then you don't need to provide Authorization in the header.
How to check which header should be provided? in the related api page -> go to the Request Headers section -> check each header, if the header is required, then it will be described in it's Description. Here is a screenshot for your reference:
Here are the steps to query entities by using sas_token:
1.Generate sas_token from azure portal. You can refer to the screenshot below:
2.Check which header are required, as per query-entities -> request-headers, we know x-ms-date is required(Authorization is not required here since we're using sas_token). You can provide a value for x-ms-date, like Wed, 13 Jan 2021 01:29:31 GMT.
If you don't know how to get the value for x-ms-date header, you can open powershell -> type Get-Date command -> then it will generate the date:
3.Prepare the request url with sas_token, like below:
https://xxx.table.core.windows.net/testtable(PartitionKey='a1',RowKey='r11')?sv=2019-12-12&ss=t&srt=sco&sp=rwdlacu&se=2021-01-13T09:24:58Z&st=2021-01-13T01:24:58Z&spr=https&sig=xxxxx
4.Use some tools like Postman, send the request with proper header. Here is the test result by using Postman:
Twitter API 1.0 doesn't need an access token. The following line returns a XML file:
https://api.twitter.com/1/statuses/user_timeline.xml?screen_name=neodev2010
Result: Valid XML
Cause API 1.0 is deprecated we need to switch to API 1.1:
https://api.twitter.com/1.1/statuses/user_timeline.xml?screen_name=neodev2010
Result: Error: Bad Authentication data
I just found examples for API 1.1 based on large PHP classes.
How is it possible to authentication via GET parameters?
Which parameters are missing to get a valid response?
access_token=123
access_secret=345
oauth_access_token=678
oauth_access_token_secret=910
consumer_key=234
You can't authenticate to Twitter via a simple GET request. You need to use their OAuth system which involves passing a few pieces of information back and forth.
I strongly advise you to find a script or a library where someone has already implemented OAuth and build your application on that. OAuth is not easy to implement, and there's no reason to write new OAuth implementations when there are so many available for free.
REST API 1.1 only support 'json' format of output.
SO use following endpoint along with your authentication data
https://api.twitter.com/1.1/statuses/user_timeline.json?screen_name=neodev2010