I am trying Easypaisa sandbox API to implement bill payment from this site:
API:
https://api.eu-de.apiconnect.appdomain.cloud/easypaisaapigw-telenorbankpk-tmbdev/dev-catalog
path:
POST /GetBillCompanies
But it is throwing error:
httpCode: '401',
httpMessage: 'Unauthorized',
moreInformation: 'Invalid client id or secret.'
Although I am providing a valid client id and secret. I tried this on postman and in the node.js program.
Related
I followed this blog for generating bearer token.
I have an API like this https://login.microsoftonline.com/<tenantid>/oauth2/token.
I tested it in postman it's working but it is not working in ADF.
Error message
"error": "invalid request"
"error description": "xxxx: The 'resource' request parameter is not supported. \r\nTrace ID: xxxxx\rnCorrelation ID: xxxx\r\nTimestamp: xxxx"
"error codes": [
901002
Yes ,you can use both resource and scope depending upon endpoint.
If you are using endpoint with oauth2/token: https://login.microsoftonline.com/<tenant id>/oauth2/token
You need to use resource=https://graph.microsoft.com/ inside the body
Body: grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>&resource=https://graph.microsoft.com/
If you are using oauth2/v2.0/token endpoint
https://login.microsoftonline.com/<tenant id>/oauth2/v2.0/token
You need to use scope:
Body: grant_type=client_credentials&client_id=<client_id>&client_secret=<client_secret>&scope=https://graph.microsoft.com/.default
The pipeline successfully executed got the token:
I've been facing the same issue randomly i.e. this issue occurs sometime while working fine most of the time. Running nodejs version 14.x over AWS Lambda.
Error sending message: FirebaseAppError: Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: connect ETIMEDOUT ".
at /opt/nodejs/node_modules/firebase-admin/lib/app/firebase-app.js:85:19
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async fetchVideosAndUsers (/var/task/src/videos-notifications.js:180:17)
at async doAction (/var/task/src/videos-notifications.js:233:30)
at async Runtime.exports.handler (/var/task/src/) {
errorInfo: {
code: 'app/invalid-credential',
message: 'Credential implementation provided to initializeApp() via the "credential" property failed to fetch a valid Google OAuth2 access token with the following error: "Error fetching access token: Error while making request: connect ETIMEDOUT".'
},
codePrefix: 'app'
}
Please advise.
This error might be caused by an issue with your application’s credentials. You can try checking the following:
Ensure that you’re requesting the scope: https://www.googleapis.com/auth/firebase.messaging, as you’ll need this to authorize access to FCM for your app.
Ensure that you obtain the proper service account. Then generate a private key file(in JSON format) to authorize access to Firebase services.
I'm trying to integrate Docusign with an Unqork app. I am trying to place the sample request that was given in createEnvelope REST API for SBS digital signature, with an embedded signing ceremony.
While trying to invoke the API, got this error:
executionError: {type: "integratorError",…}
code: 412
component: "pluginCreateEnvelope"
message: {,…}
executionError: {type: "integratorError", url: "http://localhost:43235/fbu/uapi/services/Docusign-Sandbox/execute",…}
code: 400
component: "pluginCreateEnvelope"
message: {errorCode: "SIGNATURE_PROVIDER_INVALID_FOR_NONSBS",…}
errorCode: "SIGNATURE_PROVIDER_INVALID_FOR_NONSBS"
message: "Signature providers are not valid for this recipient. Standards Based Signatures must be enabled for the sending account. Envelope is not configured for support of recipient signing providers"
type: "integratorError"
url: "http://localhost:43235/fbu/uapi/services/Docusign-Sandbox/execute"
type: "integratorError"
url: "http://localhost:43235/fbu/uapi/modules/620cbdc72b8a8801b9b67967/execute"
Can someone help how I can fix this?
Docusign demo accounts don't have SBS enabled by default. To fix your error you have to get in contact with your account team/sales team so they can add this to your account.
As an alternative you can remove "recipientSignatureProviders" from your envelopes in the demo environment and only use it with your production account.
I have this Error when I am trying to access a protected route with a auth google token.
hire is the error
{
"code": "auth/argument-error",
"message": "Firebase ID token has invalid signature. See https://firebase.google.com/docs/auth/admin/verify-id-tokens for details on how to retrieve an ID token."
}
I'am using nodejs on the server, the Api work well with postman but when i trying to access the same route in my flutter app i have this => as error: 403 message:{"error":"UnAuthorized"}
Is there any one who has a solution???
I have the answer, it was my mistake.
In the header of the request I forget to startwith "Bearer tokenId...." in flutter app.
I am trying to access the Firebase Rules API using the Google APIs Node.js Client.
I tried OAuth2 and using an API key both obtained through the gcloud console for my project, but both methods got me: Error: The caller does not have permission
This is how i tried to do it with an API key: https://gist.github.com/dergoegge/1e9cbf980148ef3febecaf0eeeb0e1fa
Are there any special restrictions on that api or am i doing something wrong?
Edit: I also tried using service account credentials https://gist.github.com/dergoegge/665d235819429d74c9d448226ec1eba3
and got
errors:
[ { message: 'Invalid Credentials',
domain: 'global',
reason: 'authError',
location: 'Authorization',
locationType: 'header' } ]
in the response.
I should have read the documentation more before asking.
I did not follow all the steps listed here: https://github.com/googleapis/google-api-nodejs-client#oauth2-client
After that it works.