Open Forum

 View Only
  • 1.  Difficulties retrieving a REST API access token

    Posted 08-25-2022 19:24
    Hello,

    I'm getting started using Cvent's REST API, and I get the following error when I attempt to create an access token:

    Authorization header requires 'Credential' parameter. Authorization header requires 'Signature' parameter. Authorization header requires 'SignedHeaders' parameter. Authorization header requires existence of either a 'X-Amz-Date' or a 'Date' header. Authorization=Basic [MY_BASE64_ENCODED_ID:SECRET]

    Here is the curl command I'm using (with sensitive info replaced with bracketed placeholders):

    curl -X POST https://api-platform.cvent.com/ea/oath2/token -H 'Authorization: Basic [MY_BASE64_ENCODED_ID:SECRET]' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=[MY_CLIENT_ID]'

    It seems from looking at https://developer-portal.cvent.com/documentation#section/Getting-Started/Authentication that the only headers required are Authorization and Content-Type, so I'm at a loss why the error mentions those other headers.

    Any insight or suggestions would be awesome. Thank you!

    #Miscellaneous

    ------------------------------
    Cheers,
    Dave
    ------------------------------


  • 2.  RE: Difficulties retrieving a REST API access token
    Best Answer

    Posted 08-29-2022 18:08
    Ah. Nevermind. I've misspelled the word "oauth" in the URL.

    ------------------------------
    Dave Davidson
    SchroderUnited States
    ------------------------------



  • 3.  RE: Difficulties retrieving a REST API access token

    Posted 18 days ago

    Hi Dave,

    I'm also having issue when using Cvent's REST API, mine is about authentication.

    I got the 401 error { "code": 401, "message": "Request failed authentication/authorization process" }
    when I run this

    curl -X POST https://api-platform-sandbox.cvent.com/ea/oauth2/token -H 'Authorization: Basic [MY_BASE64_ENCODED_ID:SECRET]' -H 'Content-Type: application/x-www-form-urlencoded' -d 'grant_type=client_credentials&client_id=[MY_CLIENT_ID]'

    Any insight or suggestions would be awesome. Thank you!



    ------------------------------
    Rainmaker Technology
    SchroderUnited States
    ------------------------------