Jump to content

Joe Lanza

Members
  • Posts

    2
  • Joined

  • Last visited

Reputation

0 Neutral
  1. Thank you for your reply. Our application uses perl. I've tried this POST so many different ways now. my $req = HTTP::Request->new(POST => https://oauth.accounting.sage.com/token); $req->header('Content-type' => 'application/x-www-form-urlencoded'); $req->content( [ client_id => $client_id, client_secret => $client_secret, grant_type => authorization_code, code => $authcode, redirect_uri => $redirect ] ); the $req->content is the Body of the POST. I've also tried putting these required values in the initial POST request: https://oauth.accounting.sage.com/token?client_id=$client_id&client_secret=$client_secret&code=$authcode&grant_type=authorization_code&redirect_uri=$redirect I've also tried putting these required parameters in the header. Can you provide a CURL example of this POST request and how the required parameters are supposed to be passed? The documentation is a little vague on this: POST https://oauth.accounting.sage.com/token Required parameters client_id Your app Client ID. You can get this value from the App Details. client_secret Your app Client Secret. You can get this value from the App Details. code The authorization code provided in the response from the previous step. grant_type This must be authorization_code. redirect_uri Your app callback URL. You must provide this value exactly as configured in the App Details, you must not add any additional params. Thank you!
  2. Hello, Using Sage Cloud Accounting and a Sage Developers account. I was able to connect via postman no problem. However, in my application, I cannot convert my auth code into the auth token. I always get {"$severity":"error","$dataCode":"DataParsingError","$message":"The data you sent could not be processed.","$source":"Proxy"} as a response. I have tried posting to https://oauth.accounting.sage.com/token using every method imaginable (with the parameters as a string in the url, within the header, and within the body of the post request. Same response every time. I am wondering if my initial auth code is incorrect. On return from the call back, I always get an auth code that looks something like this: US/ccaf9694-ea52-49be-a334-eecfd2066cd5. However, the examples always show something with way less characters: 12axxxxxxxxxxxxf7d. Am I using the correct auth code? Any help would be amazing! Thank you, A simple programmer
×
×
  • Create New...