Voice Notification-Ucpass test-2

Source: Internet
Author: User
Tags curl error code json

Stroll around, found the error code Daquan Http://docs.ucpaas.com/doku.php?id=rest_error, found that the original is the SIG checksum error, a check to know, the original SIG finally all cut into uppercase, code as follows:

#!/bin/bash

sid= "a2e9b9ba6f9daddcca0e5532e277306e"
token= "9881df2dd7add68507543c4bc7e6434a
"  timenow= ' Date +%y%m%d%h%m%s '
echo $timeNow

# get sig
sig= ' echo-n ' $sid $token$timenow ' | md5sum | awk ' {PRINT $ ' | TR ' [A-z] ' [A-z] '
echo ' sig: $sig "

# Get authorization
authorization= ' Echo-n" $sid: $timeNow "| base64-' 
  echo "Authorization: $authorization"

#curl-x POST https://api.ucpaas.com/v1/?sig= $sig \
#curl https:// api.ucpaas.com/2014-06-30/accounts/e03bc9106c6ed0eaebfce8c368fdcd48/calls/voicenotify?sig= $sig \
#curl https://api.ucpaas.com/2014-06-30/Accounts/a2e9b9ba6f9daddcca0e5532e277306e/Calls/voiceNotify?sig= $sig \
Curl https://api.ucpaas.com/2014-06-30/Accounts/a2e9b9ba6f9daddcca0e5532e277306e/Calls/voiceNotify?sig= $sig \ -
  h "Accept:application/json" \
  h "content-type:application/json;charset=utf-8" \
  h "Authorization : $authorization "\
  x POST--data-binary @info. json-vv

I got 000000 this time, but I still can't get the phone back.

This time is really to review.

END

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.