Getting 500 Internal server error for Microsoft bot framework directline v3.0 requests - rest

I am following the exact steps mentioned in the documentation to generate a new token from the directline secret for v3.0 using the REST API.
Hitting the API endpoint with a POST request: https://directline.botframework.com/v3/directline/tokens/generate
Headers:
Authorization: Bearer SECRET
I obtained the SECRET from my bot page under "Configure directline" section.
Here's a snap:
I am getting a 500 Internal server error. How do I get around this?

Related

migrating to sharefile V3. Recieving statusCode: 401 after authentication

Seattle 10
Chilkat
migrating sharefile api from V1 to V3.
Registered for API key and received credentials.
Code is successful in receiving authorization code and immediately after when sending a get request with header containing authorization code to receive list of items in a file using
GET','/sf/v3/Items('folderid)?$expand=Children&$select=Id,Name,Children,Children/Id,Children/Name',sbResponseBody)
I get a 401 error unauthorized. cannot find any help on the sharefile site.
response: Response Status Code = 401Response Header:Response Body:{"code":"Unauthorized","message":{"lang":"en-US","value":"[AUTH] Invalid Authentication"},"reason":"NotAuthenticated"}
response3:
Sorry for being verbose. Any help will be appreciated.
I'm posting the answer to my question in case somebody has a similar issue as mine.
My issue was that I was adding the word "Bearer" to the auth id which is returned by the http request while using that auth id to download my item from sharefile.
Unlike with some others I did not have to add the word bearer to the Oauthid as the http header did it for me.

Unable Auhorize Access to REST API end service with Azure Data Factory with Token Error status code 401 Unauthorized

I have configured our Azure Data Factory with a REST Link Service. I have obtained a valid token from the end service.
The token successfully works when using the token with POSTMAN, but the token returns Error status code 401 Unauthorized with Azure Data Factory.
As you can see with POSTMAN when I send a GET request with the Token I get data back:
However, with Azure Data Factory I get the error:
{
"errorCode": "2200",
"message": "Failure happened on 'Source' side. ErrorCode=RestCallFailedWithClientError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Rest call failed with client error, status code 401 Unauthorized, please check your activity settings.\nRequest URL: https://pm2.preqinsolutions.com/apiCore/api/countries.\nResponse: ,Source=Microsoft.DataTransfer.ClientLibrary,'",
"failureType": "UserError",
"target": "Copy data1",
"details": []
}
The ADF Link Service is a follows:
Can someone see something obvioius that would prevent access due 401 Unauthorized status with ADF?
I have also tried the following ADF configuration. However, I'm getting the same error:
Please try changing the authHeader name to Authorization and the value to Bearer <your API key>. I suspect from the screenshot of Postman that is what it’s doing. If that does not work then please provide a link to the documentation. This explains Bearer tokens.
You might also check the lifetime of your access token and make sure it doesn’t expire after an hour, for example.
I did a quick test against a REST API I know (Power BI REST API). The linked service looks like this and the value for the Authorization header was Bearer MY_ACCESS_TOKEN_HERE.
The dataset looks like:
The source of the Copy activity looks like:
This succeeded.
I would suggest you contact pm2.preqinsolutions.com support to see if they can provide more information on your access token / API key and have them confirm that the API isn't restricted to be accessed from only certain allowed API addresses. (ADF will not be accessing it from an on-premises IP address like your laptop.) You might also change the REST API linked service to use a self-hosted integration runtime instead of an Azure integration runtime to validate the IP address the API is called from isn't the issue.

Postman 403 forbidden CSRF token missing for Django Rest

I'm trying to test DRF login API on Postman but I'm getting 403 Forbidden CSRF token missing error. What I've done: Yes, I have CsrfViewMiddleware in settings. API works in browser but not on Postman or Flutter. I then followed these instructions: https://ourcodeworld.com/articles/read/1619/how-to-handle-postman-and-django-403-forbidden-error-csrf-verification-failed but the error remains. Any advice is appreciated.
Instead of adding the token to Headers in postman like the article suggested I added csrfmiddlewaretoken to Body and now I'm able to log in.
This post helped: How to Use Postman to Authenticate to Django REST Framework

Unable to POST to concourse REST api

I am unable to POST to https://ci.server.com/api/v1/teams/main/pipelines/test/jobs/hello-world/builds despite using the Auth bearer token as a header.
There is no issue with GET commands, using POSTMAN to test - is there some other auth required for POST?

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: