mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-25 09:51:42 -05:00
There are three authentication methods: - requires_no_auth - public endpoint that does not require an Authorisation header - requires_auth - public endpoints that need an API key in the Authorisation header - requires_admin_auth - private endpoint that requires an Authorisation header which contains the API key for the defined as the client admin user
18 lines
545 B
Python
18 lines
545 B
Python
from flask import Blueprint
|
|
from flask import current_app
|
|
from flask import request
|
|
|
|
from app.errors import register_errors
|
|
|
|
receive_notifications_blueprint = Blueprint('receive_notifications', __name__)
|
|
register_errors(receive_notifications_blueprint)
|
|
|
|
|
|
@receive_notifications_blueprint.route('/notifications/sms/receive/mmg', methods=['POST'])
|
|
def receive_mmg_sms():
|
|
post_data = request.get_json()
|
|
post_data.pop('MSISDN', None)
|
|
current_app.logger.info("Recieve notification form data: {}".format(post_data))
|
|
|
|
return "RECEIVED"
|