2022/06 現在、ショートコード、フリーダイヤル番号、10DLC の 3種類の電話番号の取得が可能
Sending Push Notifications Using Command-Line Tools に情報が記載されている
CERTIFICATE_FILE_NAME=path to the certificate file CERTIFICATE_KEY_FILE_NAME=path to the private key file TOPIC=App ID DEVICE_TOKEN=device token for your app APNS_HOST_NAME=api.sandbox.push.apple.com openssl s_client -connect "${APNS_HOST_NAME}":443 -cert "${CERTIFICATE_FILE_NAME}" -certform DER -key "${CERTIFICATE_KEY_FILE_NAME}" -keyform PEM curl -v --header "apns-topic: ${TOPIC}" --header "apns-push-type: alert" --cert "${CERTIFICATE_FILE_NAME}" --cert-type DER --key "${CERTIFICATE_KEY_FILE_NAME}" --key-type PEM --data '{"aps":{"alert":"test"}}' --http2 https://${APNS_HOST_NAME}/3/device/${DEVICE_TOKEN}
TEAM_ID=Team ID TOKEN_KEY_FILE_NAME=path to the private key file AUTH_KEY_ID=your key identifier TOPIC=App ID DEVICE_TOKEN=device token for your app APNS_HOST_NAME=api.sandbox.push.apple.com openssl s_client -connect "${APNS_HOST_NAME}":443 JWT_ISSUE_TIME=$(date +%s) JWT_HEADER=$(printf '{ "alg": "ES256", "kid": "%s" }' "${AUTH_KEY_ID}" | openssl base64 -e -A | tr -- '+/' '-_' | tr -d =) JWT_CLAIMS=$(printf '{ "iss": "%s", "iat": %d }' "${TEAM_ID}" "${JWT_ISSUE_TIME}" | openssl base64 -e -A | tr -- '+/' '-_' | tr -d =) JWT_HEADER_CLAIMS="${JWT_HEADER}.${JWT_CLAIMS}" JWT_SIGNED_HEADER_CLAIMS=$(printf "${JWT_HEADER_CLAIMS}" | openssl dgst -binary -sha256 -sign "${TOKEN_KEY_FILE_NAME}" | openssl base64 -e -A | tr -- '+/' '-_' | tr -d =) AUTHENTICATION_TOKEN="${JWT_HEADER}.${JWT_CLAIMS}.${JWT_SIGNED_HEADER_CLAIMS}" curl -v --header "apns-topic: $TOPIC" --header "apns-push-type: alert" --header "authorization: bearer $AUTHENTICATION_TOKEN" --data '{"aps":{"alert":"test"}}' --http2 https://${APNS_HOST_NAME}/3/device/${DEVICE_TOKEN}
アプリサーバーからの送信リクエストを作成する に詳細な情報の記載がある
FCM_TOKEN=<FCM_TOKEN> SERVER_KEY=<SERVER_KEY> PROJECT_ID=<PROJECT_ID> curl -X POST \ --header "Authorization: key=$SERVER_KEY" \ --header "project_id: key=$PROJECT_ID" \ --header Content-Type:"application/json" \ https://fcm.googleapis.com/fcm/send \ -d @- << EOF { "to": "$FCM_TOKEN", "notification": { "body": "message_body" }, } EOF
gcloud config configurations create playground gcloud auth login gcloud config set project playground gcloud auth activate-service-account --key-file /path/to/keyfile.json access_token=`gcloud auth print-access-token` curl \ -H "Content-Type: application/json" \ -H "Authorization: Bearer $access_token" \ -d '{"message": {"notification": {"title":"test title","body":"hello"}, "token": "<ACCESS_TOKEN>"}}' \ -X POST https://fcm.googleapis.com/v1/projects/playground/messages:send