-
Notifications
You must be signed in to change notification settings - Fork 22
Closed
Labels
BugSomething isn't workingSomething isn't working
Description
What happened?
- createNotification does not work.
- I guess the reason of error is as follows:
onesignal-node-api/apis/DefaultApi.ts
Line 257 in bb52e8c
authMethod = _config.authMethods["app_key"] - When I have changed from
app_key
touser_key
, it works normally.
Steps to reproduce?
1. install 1.0.0beta9
2. setting configuration
3. run createNotification
4. not working
What did you expect to happen?
works normally, and sent push message
Relevant log output
{"errors":["Please include a case-sensitive header of Authorization: Basic <YOUR-REST-API-KEY-HERE> or Bearer token=\"<YOUR-REST-API-KEY-HERE>\" with a valid REST API key."]}
Headers: {"access-control-allow-headers":"SDK-Version","access-control-allow-origin":"*","alt-svc":"h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400","cache-control":"no-cache","cf-cache-status":"DYNAMIC","cf-ray":"78c4f54cec66a7e3-ICN","connection":"close","content-type":"application/json; charset=utf-8","date":"Fri, 20 Jan 2023 04:10:03 GMT","referrer-policy":"strict-origin-when-cross-origin","server":"cloudflare","status":"400 Bad Request","strict-transport-security":"max-age=15552000; includeSubDomains","transfer-encoding":"chunked","vary":"Origin","via":"1.1 google","x-content-type-options":"nosniff","x-download-options":"noopen","x-frame-options":"SAMEORIGIN","x-permitted-cross-domain-policies":"none","x-request-id":"b0fc6853-25f3-4ea5-92f7-2ecd96f711eb","x-runtime":"0.005988","x-xss-protection":"1; mode=block"}
at new ApiException (/Users/yohaanyoon/classting/classting-push-service/node_modules/@onesignal/node-onesignal/dist/apis/exception.js:22:28)
at DefaultApiResponseProcessor.<anonymous> (/Users/yohaanyoon/classting/classting-push-service/node_modules/@onesignal/node-onesignal/dist/apis/DefaultApi.js:1707:31)
at step (/Users/yohaanyoon/classting/classting-push-service/node_modules/@onesignal/node-onesignal/dist/apis/DefaultApi.js:48:23)
at Object.next (/Users/yohaanyoon/classting/classting-push-service/node_modules/@onesignal/node-onesignal/dist/apis/DefaultApi.js:29:53)
at fulfilled (/Users/yohaanyoon/classting/classting-push-service/node_modules/@onesignal/node-onesignal/dist/apis/DefaultApi.js:20:58)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
code: 400,
body: BadRequestError {
errors: [
'Please include a case-sensitive header of Authorization: Basic <YOUR-REST-API-KEY-HERE> or Bearer token="<YOUR-REST-API-KEY-HERE>" with a valid REST API key.'
]
},
headers: {
'access-control-allow-headers': 'SDK-Version',
'access-control-allow-origin': '*',
'alt-svc': 'h3=":443"; ma=86400, h3-29=":443"; ma=86400',
'cache-control': 'no-cache',
'cf-cache-status': 'DYNAMIC',
'cf-ray': '78c4f54cec66a7e3-ICN',
connection: 'close',
'content-type': 'application/json; charset=utf-8',
date: 'Fri, 20 Jan 2023 04:10:03 GMT',
'referrer-policy': 'strict-origin-when-cross-origin',
server: 'cloudflare',
status: '400 Bad Request',
'strict-transport-security': 'max-age=15552000; includeSubDomains',
'transfer-encoding': 'chunked',
vary: 'Origin',
via: '1.1 google',
'x-content-type-options': 'nosniff',
'x-download-options': 'noopen',
'x-frame-options': 'SAMEORIGIN',
'x-permitted-cross-domain-policies': 'none',
'x-request-id': 'b0fc6853-25f3-4ea5-92f7-2ecd96f711eb',
'x-runtime': '0.005988',
'x-xss-protection': '1; mode=block'
}
}
Code of Conduct
- I agree to follow this project's Code of Conduct
Metadata
Metadata
Assignees
Labels
BugSomething isn't workingSomething isn't working