I am trying to authorise with an Viagogo API using oauth in my custom module (i have my credentials from Viagogo). I can construct the initial URL OK but the redirect response from the API is a relative reference with an absolute path i.e. /Public/SimpleOAuthAccessRequest/Authorize?oauth_token=Y%34hg5k34jhg5%3D
Which in turn is throwing a missing schema error using drupal_http_request.
object(stdClass)#466 (4) { [“error”]=> string(14) “missing schema” [“code”]=> int(-1002) [“redirect_code”]=> string(3) “302” [“redirect_url”]=> string(87) “/Public/SimpleOAuthAccessRequest/Authorize?oauth_token=Y%2Fbm9asdfasdfdsfjJfdd3D”
How can i get around this?
Is there a simpler way my custom module can authorise with oauth and access this API instead of my having to write this connector? The PHP code sample provided by Viagogo is using CURL and works fine outside of Drupal but once I bring the functions inside my custom module it doesn’t work hence me using drupal_http_request.