Using SAS Proc HTTP to Request Auth Token

Hi,
I am very new to GenesysCloud and this Forum, be gentle with me.

I am trying to use SAS to connect to Genesys Cloud. At this stage, I simply want to just get an Auth Token, but am getting a 400 Bad Request.

From other postings on this forum, I have seen respondents asked for the Correlation ID when a user has reported a problem. From the DEBUG info that comes back from SAS Proc HTTP, I see the following which I hope is the right thing:

Inin-Correlation-Id: 23ff73b6-4d85-4385-5330-22925bae17f0

I read from the Genesys Cloud documentation that the Client_ID/Client_Secret pair that I have been supplied with, needs to be presented in the request in Base 64 Encoding and I believe that I have done that OK.

The ProxyHost has been opened up to allow out-bound traffic and I believe that the DEBUG info shows that.

I tried to paste the DEBUG info into this post but I got an error that said "new users can only include two links in a post", so I am a bit stuck as I was not aware I was posting any links. I have removed the DEBUG info and just left the original SAS Proc HTTP step below in the hope that this gets through OK.

C'est la vie.

Whilst I appreciate not everyone knows SAS, if it helps, the SAS Proc HTTP step that was run looks like this (with the Client_ID, Client_Secret and ProxyHost mangled for the purposes of this post.
Proc HTTP
Method = "POST"
AUTH_BASIC
WEBUSERNAME ="ThereisNothingLikeADameTakeMeOutToTheBallParkDarling"
WEBPASSWORD ="WhatCanAManDoWhenAManCanDoNothingButWaitAndConsiderHisOptionsNow"
URL = ""
ProxyHost = "myproxyservername.xyz.co.mm"
ProxyPort = 443
;
HEADERS "Content-Type"="application/x-www-form-urlencoded";
DEBUG LEVEL = 1;

Run;

Any thoughts ?

Dave
Wellington.

What URL are you using to post to?

Off hand, I think AUTH_BASIC is wrong, because of the proxy you'd probably need to use PROXY_AUTH_BASIC so your headers go to the destination, not the proxy itself, though some proxies will do that for you.

I'm also not seeing your actual form content, ie: the grant_type you're asking for, not sure if you intentionally omitted or the lack of it is your problem, but not having it would definitely cause a 400 failure;

in='grant_type=client_credentials'

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.