Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Hipchat installedUrl with PHP-Parameters

Daniel leicht November 29, 2015

I want to integrate HipChat into my application.

So i use the install-trigger with the base64-descriptor and want HipChat to redirect to http://fqdn/index.php?some=parameters&with=values...

So I set the capabilities.installable.installedUrl, but HipChat doesn't redirect, after installation.

When I try to use http://www.google.com/, it works, but not with my URL with Parameters..

1 answer

1 accepted

0 votes
Answer accepted
rich
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 2, 2015

I just tested this with this descriptor...

{
    "key": "base64-addon-descriptor-tester",
    "name": "TESTER",
    "description": "TESTER",
    "vendor": {
        "name": "HipChat",
        "url": "https://www.hipchat.com"
    },
    "links": {
        "self": "https://dl.dropboxusercontent.com/u/163514/hiptron-tester/connect.json",
        "homepage": "https://dl.dropboxusercontent.com/u/163514/hiptron-tester/connect.json"
    },
    "capabilities": {
        "hipchatApiConsumer": {
            "avatar": "https://dl.dropboxusercontent.com/u/163514/hiptron-tester/img/logo.png",
            "scopes": [
                "send_notification"
            ]
        },
        "installable": {
            "installedUrl": "https://dl.dropboxusercontent.com/u/163514/hiptron-tester/test.html?some_param1=some_val1&some_param2=some_val2"
        }
    }
}

The encoded install URL after the data URI base64 encoding becomes this:

https://www.hipchat.com/addons/install?url=data%3Aapplication%2Fjson%3Bcharset%3Dutf-8%3Bbase64%2Cew0KICAgICJrZXkiOiAiYmFzZTY0LWFkZG9uLWRlc2NyaXB0b3ItdGVzdGVyIiwNCiAgICAibmFtZSI6ICJURVNURVIiLA0KICAgICJkZXNjcmlwdGlvbiI6ICJURVNURVIiLA0KICAgICJ2ZW5kb3IiOiB7DQogICAgICAgICJuYW1lIjogIkhpcENoYXQiLA0KICAgICAgICAidXJsIjogImh0dHBzOi8vd3d3LmhpcGNoYXQuY29tIg0KICAgIH0sDQogICAgImxpbmtzIjogew0KICAgICAgICAic2VsZiI6ICJodHRwczovL2RsLmRyb3Bib3h1c2VyY29udGVudC5jb20vdS8xNjM1MTQvaGlwdHJvbi10ZXN0ZXIvY29ubmVjdC5qc29uIiwNCiAgICAgICAgImhvbWVwYWdlIjogImh0dHBzOi8vZGwuZHJvcGJveHVzZXJjb250ZW50LmNvbS91LzE2MzUxNC9oaXB0cm9uLXRlc3Rlci9jb25uZWN0Lmpzb24iDQogICAgfSwNCiAgICAiY2FwYWJpbGl0aWVzIjogew0KICAgICAgICAiaGlwY2hhdEFwaUNvbnN1bWVyIjogew0KICAgICAgICAgICAgImF2YXRhciI6ICJodHRwczovL2RsLmRyb3Bib3h1c2VyY29udGVudC5jb20vdS8xNjM1MTQvaGlwdHJvbi10ZXN0ZXIvaW1nL2xvZ28ucG5nIiwNCiAgICAgICAgICAgICJzY29wZXMiOiBbDQogICAgICAgICAgICAgICAgInNlbmRfbm90aWZpY2F0aW9uIg0KICAgICAgICAgICAgXQ0KICAgICAgICB9LA0KICAgICAgICAiaW5zdGFsbGFibGUiOiB7DQogICAgICAgICAgICAiaW5zdGFsbGVkVXJsIjogImh0dHBzOi8vZGwuZHJvcGJveHVzZXJjb250ZW50LmNvbS91LzE2MzUxNC9oaXB0cm9uLXRlc3Rlci90ZXN0Lmh0bWw%2Fc29tZV9wYXJhbTE9c29tZV92YWwxJnNvbWVfcGFyYW0yPXNvbWVfdmFsMiINCiAgICAgICAgfQ0KICAgIH0NCn0%3D

I'm guessing you didn't encode your data URI so that it can be passed in as query param.

Daniel leicht December 3, 2015

Thanks for the answer, 

I don't know why I didn't try this by now, but this wasn't the error..

BUT I didn't encode the installedUrl.. That's it. Thanks smile

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events