1. Put if condition for checking if API key is exist or not
if self.api_key is not None:
auth['app_key'] = {
'type': 'bearer',
'in': 'header',
'key': 'Authorization',
'value': 'Bearer ' + self.api_key
}
the code should be under user_key condition in configuration auth variable assign
What did you expect to happen?
Calling API using api_key should return the endpoint's response
Relevant log output
No response
Code of Conduct
[X] I agree to follow this project's Code of Conduct
What happened?
Showing: "Please include a case-sensitive header of Authorization: Basic \u003cYOUR-REST-API-KEY-HERE\u003e or Bearer token=\"\u003cYOUR-REST-API-KEY-HERE\u003e\" with a valid REST API key."],"reference":["https://documentation.onesignal.com/docs/accounts-and-keys#section-keys-ids"
even if the API key included in the configuration
Steps to reproduce?
What did you expect to happen?
Calling API using api_key should return the endpoint's response
Relevant log output
No response
Code of Conduct